Drawing Solid Lines on 3D Plots












3















I am trying to draw a line moving along with a 3D graph to represent the region of integration.



enter image description here



So for this, the black line on the bottom represents the cut off for the region of integration. I would like to have a trace of the line moving along the surface of the function. Here is the MWE:



PassOptionsToPackage{usenames,dvipsnames,table,x11names}{xcolor}
documentclass[a4paper, 12pt]{article}
usepackage{pgfplots}
usepgfplotslibrary{colormaps,fillbetween}

begin{document}

begin{tikzpicture}

begin{axis}[
zmax=15,
zmin=0,
view = {45}{45},
grid=minor,
colormap={mycol}{color=(Tan), color=(Tan)},
xlabel = $s$,
ylabel = $h$,
zlabel = {$f(s,h)$},
ticks = none,
]

addplot3[
surf,
samples=30,
domain=0:1.5,
opacity=0.5,
]
{12*exp(-(4*x+3*y))};

draw[black, thick] (0,0,0) -- (1.5,1.5,0);

addplot3 [name path = xline, draw = none, domain=0:1.5] (x,0,0);
addplot3 [name path = xcurve, domain=0:1.5, y domain = 0:0, draw = none]
(x, 0, {12*exp(-(4*x))});
addplot [color = Tan, opacity = 0.5, draw = none]
fill between[of = xcurve and xline];

addplot3[
mesh,
draw=Bittersweet,
samples=30,
domain=0:1.5,
opacity = 0.75
]
{12*exp(-(4*x+3*y))};

% Attempt 1
%addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(4*x+3*y))});

%Attempt 2
%addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(7*x))});

end{axis}
end{tikzpicture}


The two commented out lines toward the end, which I called Attempt 1 and Attempt 2, are namely my two attempts at doing this. Here is the result for each of them:



Attempt 1



enter image description here



Attempt 2



enter image description here



Attempt 1 is a mess, but Attempt 2 is very close to what I want, but it draws a line across the start and end points of the function. Any suggestions as to how I could fix this?










share|improve this question



























    3















    I am trying to draw a line moving along with a 3D graph to represent the region of integration.



    enter image description here



    So for this, the black line on the bottom represents the cut off for the region of integration. I would like to have a trace of the line moving along the surface of the function. Here is the MWE:



    PassOptionsToPackage{usenames,dvipsnames,table,x11names}{xcolor}
    documentclass[a4paper, 12pt]{article}
    usepackage{pgfplots}
    usepgfplotslibrary{colormaps,fillbetween}

    begin{document}

    begin{tikzpicture}

    begin{axis}[
    zmax=15,
    zmin=0,
    view = {45}{45},
    grid=minor,
    colormap={mycol}{color=(Tan), color=(Tan)},
    xlabel = $s$,
    ylabel = $h$,
    zlabel = {$f(s,h)$},
    ticks = none,
    ]

    addplot3[
    surf,
    samples=30,
    domain=0:1.5,
    opacity=0.5,
    ]
    {12*exp(-(4*x+3*y))};

    draw[black, thick] (0,0,0) -- (1.5,1.5,0);

    addplot3 [name path = xline, draw = none, domain=0:1.5] (x,0,0);
    addplot3 [name path = xcurve, domain=0:1.5, y domain = 0:0, draw = none]
    (x, 0, {12*exp(-(4*x))});
    addplot [color = Tan, opacity = 0.5, draw = none]
    fill between[of = xcurve and xline];

    addplot3[
    mesh,
    draw=Bittersweet,
    samples=30,
    domain=0:1.5,
    opacity = 0.75
    ]
    {12*exp(-(4*x+3*y))};

    % Attempt 1
    %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(4*x+3*y))});

    %Attempt 2
    %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(7*x))});

    end{axis}
    end{tikzpicture}


    The two commented out lines toward the end, which I called Attempt 1 and Attempt 2, are namely my two attempts at doing this. Here is the result for each of them:



    Attempt 1



    enter image description here



    Attempt 2



    enter image description here



    Attempt 1 is a mess, but Attempt 2 is very close to what I want, but it draws a line across the start and end points of the function. Any suggestions as to how I could fix this?










    share|improve this question

























      3












      3








      3








      I am trying to draw a line moving along with a 3D graph to represent the region of integration.



      enter image description here



      So for this, the black line on the bottom represents the cut off for the region of integration. I would like to have a trace of the line moving along the surface of the function. Here is the MWE:



      PassOptionsToPackage{usenames,dvipsnames,table,x11names}{xcolor}
      documentclass[a4paper, 12pt]{article}
      usepackage{pgfplots}
      usepgfplotslibrary{colormaps,fillbetween}

      begin{document}

      begin{tikzpicture}

      begin{axis}[
      zmax=15,
      zmin=0,
      view = {45}{45},
      grid=minor,
      colormap={mycol}{color=(Tan), color=(Tan)},
      xlabel = $s$,
      ylabel = $h$,
      zlabel = {$f(s,h)$},
      ticks = none,
      ]

      addplot3[
      surf,
      samples=30,
      domain=0:1.5,
      opacity=0.5,
      ]
      {12*exp(-(4*x+3*y))};

      draw[black, thick] (0,0,0) -- (1.5,1.5,0);

      addplot3 [name path = xline, draw = none, domain=0:1.5] (x,0,0);
      addplot3 [name path = xcurve, domain=0:1.5, y domain = 0:0, draw = none]
      (x, 0, {12*exp(-(4*x))});
      addplot [color = Tan, opacity = 0.5, draw = none]
      fill between[of = xcurve and xline];

      addplot3[
      mesh,
      draw=Bittersweet,
      samples=30,
      domain=0:1.5,
      opacity = 0.75
      ]
      {12*exp(-(4*x+3*y))};

      % Attempt 1
      %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(4*x+3*y))});

      %Attempt 2
      %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(7*x))});

      end{axis}
      end{tikzpicture}


      The two commented out lines toward the end, which I called Attempt 1 and Attempt 2, are namely my two attempts at doing this. Here is the result for each of them:



      Attempt 1



      enter image description here



      Attempt 2



      enter image description here



      Attempt 1 is a mess, but Attempt 2 is very close to what I want, but it draws a line across the start and end points of the function. Any suggestions as to how I could fix this?










      share|improve this question














      I am trying to draw a line moving along with a 3D graph to represent the region of integration.



      enter image description here



      So for this, the black line on the bottom represents the cut off for the region of integration. I would like to have a trace of the line moving along the surface of the function. Here is the MWE:



      PassOptionsToPackage{usenames,dvipsnames,table,x11names}{xcolor}
      documentclass[a4paper, 12pt]{article}
      usepackage{pgfplots}
      usepgfplotslibrary{colormaps,fillbetween}

      begin{document}

      begin{tikzpicture}

      begin{axis}[
      zmax=15,
      zmin=0,
      view = {45}{45},
      grid=minor,
      colormap={mycol}{color=(Tan), color=(Tan)},
      xlabel = $s$,
      ylabel = $h$,
      zlabel = {$f(s,h)$},
      ticks = none,
      ]

      addplot3[
      surf,
      samples=30,
      domain=0:1.5,
      opacity=0.5,
      ]
      {12*exp(-(4*x+3*y))};

      draw[black, thick] (0,0,0) -- (1.5,1.5,0);

      addplot3 [name path = xline, draw = none, domain=0:1.5] (x,0,0);
      addplot3 [name path = xcurve, domain=0:1.5, y domain = 0:0, draw = none]
      (x, 0, {12*exp(-(4*x))});
      addplot [color = Tan, opacity = 0.5, draw = none]
      fill between[of = xcurve and xline];

      addplot3[
      mesh,
      draw=Bittersweet,
      samples=30,
      domain=0:1.5,
      opacity = 0.75
      ]
      {12*exp(-(4*x+3*y))};

      % Attempt 1
      %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(4*x+3*y))});

      %Attempt 2
      %addplot3 [domain=0:1.5, black, thick, samples=30] (x,x,{12*exp(-(7*x))});

      end{axis}
      end{tikzpicture}


      The two commented out lines toward the end, which I called Attempt 1 and Attempt 2, are namely my two attempts at doing this. Here is the result for each of them:



      Attempt 1



      enter image description here



      Attempt 2



      enter image description here



      Attempt 1 is a mess, but Attempt 2 is very close to what I want, but it draws a line across the start and end points of the function. Any suggestions as to how I could fix this?







      tikz-pgf pgfplots 3d






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 25 at 10:48









      Aiden KennyAiden Kenny

      4117




      4117






















          1 Answer
          1






          active

          oldest

          votes


















          3














          You already were on the right track. You can achieve what you want by adding samples y=1 to your second attempt.



          (Besides that I did some minor optimazations to your code. See the comments in the code for details.)



          % used PGFPlots v1.16
          documentclass[border=5pt]{standalone}
          usepackage[dvipsnames]{xcolor}
          usepackage{pgfplots}
          usepgfplotslibrary{fillbetween}
          pgfplotsset{
          compat=1.16,
          }
          begin{document}
          begin{tikzpicture}
          begin{axis}[
          zmax=15,
          zmin=0,
          view={45}{45},
          grid=minor,
          colormap={mycol}{color=(Tan), color=(Tan)},
          xlabel=$s$,
          ylabel=$h$,
          zlabel={$f(s,h)$},
          ticks=none,
          % (moved common options here)
          domain=0:1.5,
          samples=30,
          ]

          addplot3[
          surf,
          opacity=0.5,
          % removed one `addplot' by adding the next line
          faceted color=Bittersweet,
          ] {12*exp(-(4*x+3*y))};

          draw [black, thick] (0,0,0) -- (1.5,1.5,0);

          addplot3 [
          name path=xline,
          draw=none,
          ] (x,0,0);
          addplot3 [
          name path=xcurve,
          % replaced this ...
          % y domain=0:0,
          % by ...
          samples y=1,
          draw=none,
          ] (x,0,{12*exp(-(4*x))});
          addplot [color=Tan, opacity=0.5]
          fill between [of=xcurve and xline];


          % Attempt 2
          addplot3 [
          black,
          thick,
          samples y=1, % <-- added
          ] (x,x,{12*exp(-7*x)});

          end{axis}
          end{tikzpicture}
          end{document}


          image showing the result of above code






          share|improve this answer





















          • 1





            +1: What is the meaning of samples y=0?

            – Dr. Manuel Kuehner
            Feb 25 at 13:43











          • Interesting, I also would like to know why this works, thank you!

            – Aiden Kenny
            Feb 25 at 13:53






          • 1





            Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

            – Stefan Pinnow
            Feb 25 at 14:07











          • Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

            – Stefan Pinnow
            Feb 25 at 14:10













          • It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

            – Stefan Pinnow
            Feb 28 at 4:42











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476573%2fdrawing-solid-lines-on-3d-plots%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          You already were on the right track. You can achieve what you want by adding samples y=1 to your second attempt.



          (Besides that I did some minor optimazations to your code. See the comments in the code for details.)



          % used PGFPlots v1.16
          documentclass[border=5pt]{standalone}
          usepackage[dvipsnames]{xcolor}
          usepackage{pgfplots}
          usepgfplotslibrary{fillbetween}
          pgfplotsset{
          compat=1.16,
          }
          begin{document}
          begin{tikzpicture}
          begin{axis}[
          zmax=15,
          zmin=0,
          view={45}{45},
          grid=minor,
          colormap={mycol}{color=(Tan), color=(Tan)},
          xlabel=$s$,
          ylabel=$h$,
          zlabel={$f(s,h)$},
          ticks=none,
          % (moved common options here)
          domain=0:1.5,
          samples=30,
          ]

          addplot3[
          surf,
          opacity=0.5,
          % removed one `addplot' by adding the next line
          faceted color=Bittersweet,
          ] {12*exp(-(4*x+3*y))};

          draw [black, thick] (0,0,0) -- (1.5,1.5,0);

          addplot3 [
          name path=xline,
          draw=none,
          ] (x,0,0);
          addplot3 [
          name path=xcurve,
          % replaced this ...
          % y domain=0:0,
          % by ...
          samples y=1,
          draw=none,
          ] (x,0,{12*exp(-(4*x))});
          addplot [color=Tan, opacity=0.5]
          fill between [of=xcurve and xline];


          % Attempt 2
          addplot3 [
          black,
          thick,
          samples y=1, % <-- added
          ] (x,x,{12*exp(-7*x)});

          end{axis}
          end{tikzpicture}
          end{document}


          image showing the result of above code






          share|improve this answer





















          • 1





            +1: What is the meaning of samples y=0?

            – Dr. Manuel Kuehner
            Feb 25 at 13:43











          • Interesting, I also would like to know why this works, thank you!

            – Aiden Kenny
            Feb 25 at 13:53






          • 1





            Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

            – Stefan Pinnow
            Feb 25 at 14:07











          • Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

            – Stefan Pinnow
            Feb 25 at 14:10













          • It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

            – Stefan Pinnow
            Feb 28 at 4:42
















          3














          You already were on the right track. You can achieve what you want by adding samples y=1 to your second attempt.



          (Besides that I did some minor optimazations to your code. See the comments in the code for details.)



          % used PGFPlots v1.16
          documentclass[border=5pt]{standalone}
          usepackage[dvipsnames]{xcolor}
          usepackage{pgfplots}
          usepgfplotslibrary{fillbetween}
          pgfplotsset{
          compat=1.16,
          }
          begin{document}
          begin{tikzpicture}
          begin{axis}[
          zmax=15,
          zmin=0,
          view={45}{45},
          grid=minor,
          colormap={mycol}{color=(Tan), color=(Tan)},
          xlabel=$s$,
          ylabel=$h$,
          zlabel={$f(s,h)$},
          ticks=none,
          % (moved common options here)
          domain=0:1.5,
          samples=30,
          ]

          addplot3[
          surf,
          opacity=0.5,
          % removed one `addplot' by adding the next line
          faceted color=Bittersweet,
          ] {12*exp(-(4*x+3*y))};

          draw [black, thick] (0,0,0) -- (1.5,1.5,0);

          addplot3 [
          name path=xline,
          draw=none,
          ] (x,0,0);
          addplot3 [
          name path=xcurve,
          % replaced this ...
          % y domain=0:0,
          % by ...
          samples y=1,
          draw=none,
          ] (x,0,{12*exp(-(4*x))});
          addplot [color=Tan, opacity=0.5]
          fill between [of=xcurve and xline];


          % Attempt 2
          addplot3 [
          black,
          thick,
          samples y=1, % <-- added
          ] (x,x,{12*exp(-7*x)});

          end{axis}
          end{tikzpicture}
          end{document}


          image showing the result of above code






          share|improve this answer





















          • 1





            +1: What is the meaning of samples y=0?

            – Dr. Manuel Kuehner
            Feb 25 at 13:43











          • Interesting, I also would like to know why this works, thank you!

            – Aiden Kenny
            Feb 25 at 13:53






          • 1





            Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

            – Stefan Pinnow
            Feb 25 at 14:07











          • Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

            – Stefan Pinnow
            Feb 25 at 14:10













          • It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

            – Stefan Pinnow
            Feb 28 at 4:42














          3












          3








          3







          You already were on the right track. You can achieve what you want by adding samples y=1 to your second attempt.



          (Besides that I did some minor optimazations to your code. See the comments in the code for details.)



          % used PGFPlots v1.16
          documentclass[border=5pt]{standalone}
          usepackage[dvipsnames]{xcolor}
          usepackage{pgfplots}
          usepgfplotslibrary{fillbetween}
          pgfplotsset{
          compat=1.16,
          }
          begin{document}
          begin{tikzpicture}
          begin{axis}[
          zmax=15,
          zmin=0,
          view={45}{45},
          grid=minor,
          colormap={mycol}{color=(Tan), color=(Tan)},
          xlabel=$s$,
          ylabel=$h$,
          zlabel={$f(s,h)$},
          ticks=none,
          % (moved common options here)
          domain=0:1.5,
          samples=30,
          ]

          addplot3[
          surf,
          opacity=0.5,
          % removed one `addplot' by adding the next line
          faceted color=Bittersweet,
          ] {12*exp(-(4*x+3*y))};

          draw [black, thick] (0,0,0) -- (1.5,1.5,0);

          addplot3 [
          name path=xline,
          draw=none,
          ] (x,0,0);
          addplot3 [
          name path=xcurve,
          % replaced this ...
          % y domain=0:0,
          % by ...
          samples y=1,
          draw=none,
          ] (x,0,{12*exp(-(4*x))});
          addplot [color=Tan, opacity=0.5]
          fill between [of=xcurve and xline];


          % Attempt 2
          addplot3 [
          black,
          thick,
          samples y=1, % <-- added
          ] (x,x,{12*exp(-7*x)});

          end{axis}
          end{tikzpicture}
          end{document}


          image showing the result of above code






          share|improve this answer















          You already were on the right track. You can achieve what you want by adding samples y=1 to your second attempt.



          (Besides that I did some minor optimazations to your code. See the comments in the code for details.)



          % used PGFPlots v1.16
          documentclass[border=5pt]{standalone}
          usepackage[dvipsnames]{xcolor}
          usepackage{pgfplots}
          usepgfplotslibrary{fillbetween}
          pgfplotsset{
          compat=1.16,
          }
          begin{document}
          begin{tikzpicture}
          begin{axis}[
          zmax=15,
          zmin=0,
          view={45}{45},
          grid=minor,
          colormap={mycol}{color=(Tan), color=(Tan)},
          xlabel=$s$,
          ylabel=$h$,
          zlabel={$f(s,h)$},
          ticks=none,
          % (moved common options here)
          domain=0:1.5,
          samples=30,
          ]

          addplot3[
          surf,
          opacity=0.5,
          % removed one `addplot' by adding the next line
          faceted color=Bittersweet,
          ] {12*exp(-(4*x+3*y))};

          draw [black, thick] (0,0,0) -- (1.5,1.5,0);

          addplot3 [
          name path=xline,
          draw=none,
          ] (x,0,0);
          addplot3 [
          name path=xcurve,
          % replaced this ...
          % y domain=0:0,
          % by ...
          samples y=1,
          draw=none,
          ] (x,0,{12*exp(-(4*x))});
          addplot [color=Tan, opacity=0.5]
          fill between [of=xcurve and xline];


          % Attempt 2
          addplot3 [
          black,
          thick,
          samples y=1, % <-- added
          ] (x,x,{12*exp(-7*x)});

          end{axis}
          end{tikzpicture}
          end{document}


          image showing the result of above code







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 25 at 20:54

























          answered Feb 25 at 13:23









          Stefan PinnowStefan Pinnow

          20.1k83276




          20.1k83276








          • 1





            +1: What is the meaning of samples y=0?

            – Dr. Manuel Kuehner
            Feb 25 at 13:43











          • Interesting, I also would like to know why this works, thank you!

            – Aiden Kenny
            Feb 25 at 13:53






          • 1





            Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

            – Stefan Pinnow
            Feb 25 at 14:07











          • Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

            – Stefan Pinnow
            Feb 25 at 14:10













          • It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

            – Stefan Pinnow
            Feb 28 at 4:42














          • 1





            +1: What is the meaning of samples y=0?

            – Dr. Manuel Kuehner
            Feb 25 at 13:43











          • Interesting, I also would like to know why this works, thank you!

            – Aiden Kenny
            Feb 25 at 13:53






          • 1





            Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

            – Stefan Pinnow
            Feb 25 at 14:07











          • Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

            – Stefan Pinnow
            Feb 25 at 14:10













          • It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

            – Stefan Pinnow
            Feb 28 at 4:42








          1




          1





          +1: What is the meaning of samples y=0?

          – Dr. Manuel Kuehner
          Feb 25 at 13:43





          +1: What is the meaning of samples y=0?

          – Dr. Manuel Kuehner
          Feb 25 at 13:43













          Interesting, I also would like to know why this works, thank you!

          – Aiden Kenny
          Feb 25 at 13:53





          Interesting, I also would like to know why this works, thank you!

          – Aiden Kenny
          Feb 25 at 13:53




          1




          1





          Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

          – Stefan Pinnow
          Feb 25 at 14:07





          Using samples y is used for mesh plots and by default is set to the same value as samples. Setting it to 0 forces a line plot which is what you want to draw.

          – Stefan Pinnow
          Feb 25 at 14:07













          Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

          – Stefan Pinnow
          Feb 25 at 14:10







          Addition: I just read in the manual (section 4.6.2 on page 123 in v1.16) that also samples y=1 or y domain=0:0 forces a line plot. But the given examples all use samples y=0. I'll take a note and discuss with Christian to harmonize it.

          – Stefan Pinnow
          Feb 25 at 14:10















          It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

          – Stefan Pinnow
          Feb 28 at 4:42





          It seems I missed to send this comment ...: I updated my answer using samples=1 which was agreed on to use in the manual in future uniformly. It makes more sense to use one y sample instead of none ;)

          – Stefan Pinnow
          Feb 28 at 4:42


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476573%2fdrawing-solid-lines-on-3d-plots%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?