Plot a graph above a curve with vertical lines as patternRotate a node but not its content: the case of the...

How much cash can I safely carry into the USA and avoid civil forfeiture?

What are the potential pitfalls when using metals as a currency?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Why do games have consumables?

Does holding a wand and speaking its command word count as V/S/M spell components?

What's the polite way to say "I need to urinate"?

How to stop co-workers from teasing me because I know Russian?

How to make a pipeline wait for end-of-file or stop after an error?

How can I place the product on a social media post better?

Document starts having heaps of errors in the middle, but the code doesn't have any problems in it

A Strange Latex Symbol

Size of electromagnet needed to replicate Earth's magnetic field

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

Unexpected email from Yorkshire Bank

How to creep the reader out with what seems like a normal person?

French for 'It must be my imagination'?

Why other Westeros houses don't use wildfire?

What is Niska's accent?

Rivers without rain

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

How did Captain America manage to do this?

Is the 5 MB static resource size limit 5,242,880 bytes or 5,000,000 bytes?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

US visa is under administrative processing, I need the passport back ASAP



Plot a graph above a curve with vertical lines as pattern


Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionProblems with pattern colorLine up nested tikz enviroments or how to get rid of themSine function in pgfplots and MATLAB. Why are different results obtained?Slanting a square together with its patternwood pattern with metapostInaccurate Calculations By pgfplots













0















I want to plot the graph of a function (say a sine) on a curve, that is to say, plot the graph above a straight line then distort it into a given curve.



Here's a minimal example :



documentclass[pstricks,border=12pt]{standalone}  
usepackage[left=4.0cm,right=4.0cm,top=4.0cm,bottom=4.0cm]{geometry}
usepackage{tikz}
usetikzlibrary{patterns}
usepackage{pgfplots}
usepackage{caption}
usepackage{amsmath,amssymb,amsthm}
usepackage{xcolor}
usetikzlibrary{arrows}
%
%
begin{document}
%
%
%
begin{figure}[!h]
centering
captionsetup{justification=centering,margin=2cm}
begin{tikzpicture}[scale=1.0]
%
draw[](-4,0)--(4,0);
%
draw [red, thick] plot [pattern = vertical lines, rotate = 0, domain = -4:4, samples = 120] (x,{0.5*sin(x*180)});
%
begin{scope} [shift={(0.0,0.0)}]
draw [blue, thick] plot [rotate = 0.0, domain = -4.0:4.0, samples = 80] (x,{-1.65*(x*x-16)/16});
end{scope}
%
end{tikzpicture}
caption{label{Name}Bla bla...}
end{figure}
%
%
%
end{document}


I first plot a horizontal straight line then plot a sine function above it (observe here that the pattern function does not work ; what am I doing wrong here ?). Then, I would like to plot say the same sine function but "above" the blue curve, as if the graph was following the blue curve.










share|improve this question



























    0















    I want to plot the graph of a function (say a sine) on a curve, that is to say, plot the graph above a straight line then distort it into a given curve.



    Here's a minimal example :



    documentclass[pstricks,border=12pt]{standalone}  
    usepackage[left=4.0cm,right=4.0cm,top=4.0cm,bottom=4.0cm]{geometry}
    usepackage{tikz}
    usetikzlibrary{patterns}
    usepackage{pgfplots}
    usepackage{caption}
    usepackage{amsmath,amssymb,amsthm}
    usepackage{xcolor}
    usetikzlibrary{arrows}
    %
    %
    begin{document}
    %
    %
    %
    begin{figure}[!h]
    centering
    captionsetup{justification=centering,margin=2cm}
    begin{tikzpicture}[scale=1.0]
    %
    draw[](-4,0)--(4,0);
    %
    draw [red, thick] plot [pattern = vertical lines, rotate = 0, domain = -4:4, samples = 120] (x,{0.5*sin(x*180)});
    %
    begin{scope} [shift={(0.0,0.0)}]
    draw [blue, thick] plot [rotate = 0.0, domain = -4.0:4.0, samples = 80] (x,{-1.65*(x*x-16)/16});
    end{scope}
    %
    end{tikzpicture}
    caption{label{Name}Bla bla...}
    end{figure}
    %
    %
    %
    end{document}


    I first plot a horizontal straight line then plot a sine function above it (observe here that the pattern function does not work ; what am I doing wrong here ?). Then, I would like to plot say the same sine function but "above" the blue curve, as if the graph was following the blue curve.










    share|improve this question

























      0












      0








      0








      I want to plot the graph of a function (say a sine) on a curve, that is to say, plot the graph above a straight line then distort it into a given curve.



      Here's a minimal example :



      documentclass[pstricks,border=12pt]{standalone}  
      usepackage[left=4.0cm,right=4.0cm,top=4.0cm,bottom=4.0cm]{geometry}
      usepackage{tikz}
      usetikzlibrary{patterns}
      usepackage{pgfplots}
      usepackage{caption}
      usepackage{amsmath,amssymb,amsthm}
      usepackage{xcolor}
      usetikzlibrary{arrows}
      %
      %
      begin{document}
      %
      %
      %
      begin{figure}[!h]
      centering
      captionsetup{justification=centering,margin=2cm}
      begin{tikzpicture}[scale=1.0]
      %
      draw[](-4,0)--(4,0);
      %
      draw [red, thick] plot [pattern = vertical lines, rotate = 0, domain = -4:4, samples = 120] (x,{0.5*sin(x*180)});
      %
      begin{scope} [shift={(0.0,0.0)}]
      draw [blue, thick] plot [rotate = 0.0, domain = -4.0:4.0, samples = 80] (x,{-1.65*(x*x-16)/16});
      end{scope}
      %
      end{tikzpicture}
      caption{label{Name}Bla bla...}
      end{figure}
      %
      %
      %
      end{document}


      I first plot a horizontal straight line then plot a sine function above it (observe here that the pattern function does not work ; what am I doing wrong here ?). Then, I would like to plot say the same sine function but "above" the blue curve, as if the graph was following the blue curve.










      share|improve this question














      I want to plot the graph of a function (say a sine) on a curve, that is to say, plot the graph above a straight line then distort it into a given curve.



      Here's a minimal example :



      documentclass[pstricks,border=12pt]{standalone}  
      usepackage[left=4.0cm,right=4.0cm,top=4.0cm,bottom=4.0cm]{geometry}
      usepackage{tikz}
      usetikzlibrary{patterns}
      usepackage{pgfplots}
      usepackage{caption}
      usepackage{amsmath,amssymb,amsthm}
      usepackage{xcolor}
      usetikzlibrary{arrows}
      %
      %
      begin{document}
      %
      %
      %
      begin{figure}[!h]
      centering
      captionsetup{justification=centering,margin=2cm}
      begin{tikzpicture}[scale=1.0]
      %
      draw[](-4,0)--(4,0);
      %
      draw [red, thick] plot [pattern = vertical lines, rotate = 0, domain = -4:4, samples = 120] (x,{0.5*sin(x*180)});
      %
      begin{scope} [shift={(0.0,0.0)}]
      draw [blue, thick] plot [rotate = 0.0, domain = -4.0:4.0, samples = 80] (x,{-1.65*(x*x-16)/16});
      end{scope}
      %
      end{tikzpicture}
      caption{label{Name}Bla bla...}
      end{figure}
      %
      %
      %
      end{document}


      I first plot a horizontal straight line then plot a sine function above it (observe here that the pattern function does not work ; what am I doing wrong here ?). Then, I would like to plot say the same sine function but "above" the blue curve, as if the graph was following the blue curve.







      tikz-pgf tikz-styles pattern






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 28 mins ago









      NicolasNicolas

      827




      827






















          0






          active

          oldest

          votes












          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%2f487988%2fplot-a-graph-above-a-curve-with-vertical-lines-as-pattern%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f487988%2fplot-a-graph-above-a-curve-with-vertical-lines-as-pattern%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

          Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

          Schneeberg (Smreczany) Bibliografia | Menu...

          Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...