Rotated Normal Distribution

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I`m trying to create a rotated normal distribution similar to this:
enter image description here



but I'm stuck at trying to separate the curves from each other; this is what I have so far. Would really appreciate any help.



documentclassarticle
usepackagepgfplots
usepackagemathtools,amssymb
usepackagetikz
usepackagexcolor
pgfplotssetcompat=1.7
begindocument
pgfmathdeclarefunctiongauss2pgfmathparse1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))%

begintikzpicture

beginaxis[anchor=origin, % Shift the axis so its origin is at (0,0)
rotate around=-90:(current axis.origin), % Rotate around the origin
no markers, domain=0:10, samples=100,
axis x line*=bottom,
axis lines=none, % Axis lines going through the origin
height=5cm, width=5cm, ytick=empty, xtick=0,
enlargelimits=false, clip=false, axis on top,
grid = major]
addplot [domain=-3:3] gauss(0,1);
endaxis

beginaxis[anchor=(0,10), % Shift the axis so its origin is at (0,0)
rotate around=-90:(current axis.origin), % Rotate around the origin
no markers, domain=0:10, samples=100,
axis x line*=bottom,
axis lines=none, % Axis lines going through the origin
height=5cm, width=5cm, ytick=empty, xtick=0,
enlargelimits=false, clip=false, axis on top,
grid = major]
addplot [domain=-3:3] gauss(0,1);
endaxis

draw (-2,-6) -- (9,-6);

endtikzpicture
enddocument









share|improve this question







New contributor




user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    1
    down vote

    favorite












    I`m trying to create a rotated normal distribution similar to this:
    enter image description here



    but I'm stuck at trying to separate the curves from each other; this is what I have so far. Would really appreciate any help.



    documentclassarticle
    usepackagepgfplots
    usepackagemathtools,amssymb
    usepackagetikz
    usepackagexcolor
    pgfplotssetcompat=1.7
    begindocument
    pgfmathdeclarefunctiongauss2pgfmathparse1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))%

    begintikzpicture

    beginaxis[anchor=origin, % Shift the axis so its origin is at (0,0)
    rotate around=-90:(current axis.origin), % Rotate around the origin
    no markers, domain=0:10, samples=100,
    axis x line*=bottom,
    axis lines=none, % Axis lines going through the origin
    height=5cm, width=5cm, ytick=empty, xtick=0,
    enlargelimits=false, clip=false, axis on top,
    grid = major]
    addplot [domain=-3:3] gauss(0,1);
    endaxis

    beginaxis[anchor=(0,10), % Shift the axis so its origin is at (0,0)
    rotate around=-90:(current axis.origin), % Rotate around the origin
    no markers, domain=0:10, samples=100,
    axis x line*=bottom,
    axis lines=none, % Axis lines going through the origin
    height=5cm, width=5cm, ytick=empty, xtick=0,
    enlargelimits=false, clip=false, axis on top,
    grid = major]
    addplot [domain=-3:3] gauss(0,1);
    endaxis

    draw (-2,-6) -- (9,-6);

    endtikzpicture
    enddocument









    share|improve this question







    New contributor




    user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I`m trying to create a rotated normal distribution similar to this:
      enter image description here



      but I'm stuck at trying to separate the curves from each other; this is what I have so far. Would really appreciate any help.



      documentclassarticle
      usepackagepgfplots
      usepackagemathtools,amssymb
      usepackagetikz
      usepackagexcolor
      pgfplotssetcompat=1.7
      begindocument
      pgfmathdeclarefunctiongauss2pgfmathparse1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))%

      begintikzpicture

      beginaxis[anchor=origin, % Shift the axis so its origin is at (0,0)
      rotate around=-90:(current axis.origin), % Rotate around the origin
      no markers, domain=0:10, samples=100,
      axis x line*=bottom,
      axis lines=none, % Axis lines going through the origin
      height=5cm, width=5cm, ytick=empty, xtick=0,
      enlargelimits=false, clip=false, axis on top,
      grid = major]
      addplot [domain=-3:3] gauss(0,1);
      endaxis

      beginaxis[anchor=(0,10), % Shift the axis so its origin is at (0,0)
      rotate around=-90:(current axis.origin), % Rotate around the origin
      no markers, domain=0:10, samples=100,
      axis x line*=bottom,
      axis lines=none, % Axis lines going through the origin
      height=5cm, width=5cm, ytick=empty, xtick=0,
      enlargelimits=false, clip=false, axis on top,
      grid = major]
      addplot [domain=-3:3] gauss(0,1);
      endaxis

      draw (-2,-6) -- (9,-6);

      endtikzpicture
      enddocument









      share|improve this question







      New contributor




      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I`m trying to create a rotated normal distribution similar to this:
      enter image description here



      but I'm stuck at trying to separate the curves from each other; this is what I have so far. Would really appreciate any help.



      documentclassarticle
      usepackagepgfplots
      usepackagemathtools,amssymb
      usepackagetikz
      usepackagexcolor
      pgfplotssetcompat=1.7
      begindocument
      pgfmathdeclarefunctiongauss2pgfmathparse1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))%

      begintikzpicture

      beginaxis[anchor=origin, % Shift the axis so its origin is at (0,0)
      rotate around=-90:(current axis.origin), % Rotate around the origin
      no markers, domain=0:10, samples=100,
      axis x line*=bottom,
      axis lines=none, % Axis lines going through the origin
      height=5cm, width=5cm, ytick=empty, xtick=0,
      enlargelimits=false, clip=false, axis on top,
      grid = major]
      addplot [domain=-3:3] gauss(0,1);
      endaxis

      beginaxis[anchor=(0,10), % Shift the axis so its origin is at (0,0)
      rotate around=-90:(current axis.origin), % Rotate around the origin
      no markers, domain=0:10, samples=100,
      axis x line*=bottom,
      axis lines=none, % Axis lines going through the origin
      height=5cm, width=5cm, ytick=empty, xtick=0,
      enlargelimits=false, clip=false, axis on top,
      grid = major]
      addplot [domain=-3:3] gauss(0,1);
      endaxis

      draw (-2,-6) -- (9,-6);

      endtikzpicture
      enddocument






      tikz-pgf pgfplots






      share|improve this question







      New contributor




      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      user171006

      61




      61




      New contributor




      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user171006 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote













          Welcome to TeX.SE! Are you looking for something like this?



          documentclassarticle
          usepackagepgfplots
          pgfplotssetcompat=1.16
          begindocument
          begintikzpicture[font=sffamily,
          declare function=gauss(x,y,z)=1/(y*sqrt(2*pi))*exp(-((x-z)^2)/(2*y^2));]

          beginaxis[samples=101,smooth,hide axis,width=12cm]
          addplot [domain=-3:3] (gauss(x,0.8,0),x);
          addplot [domain=-3:3] (1+gauss(x,1.2,0),1+x);
          addplot [domain=-3:3] (2+gauss(x,0.6,0),x);

          draw (0,-3) -- (0,3) coordinate[pos=0.4](x1) coordinate[pos=0.5] (y1);
          draw (1,-2) -- (1,4) coordinate[pos=0.6](x2) coordinate[pos=0.5] (y2);
          draw (2,-3) -- (2,3) coordinate[pos=0.6](x3) coordinate[pos=0.5] (y3);
          addplot[-latex] coordinates(-0.5,-4) (3,-4);
          path (0,-4) coordinate (z1) (1,-4) coordinate (z2) (2,-4) coordinate (z3);
          coordinate (t) at (3,-4.1);
          endaxis
          foreach X in 1,2,3
          fill (xX) circle (2pt);
          draw ([xshift=-1mm]yX) -- ([xshift=1mm]yX);
          draw ([yshift=1mm]zX) -- ([yshift=-1mm]zX) node[below] $X$;
          node[anchor=north east] at (t) time;
          draw[blue,thick,shorten >=2mm,shorten <=2mm] (x1) -- (x2);
          draw[blue,thick,shorten >=2mm,shorten <=2mm] (x2) -- (x3);
          endtikzpicture
          enddocument


          enter image description here



          Comments:



          1. Is there any reason you want to use version 1.7? If so, one may have to slightly modify the syntax by adding axis cs: to some coordinates.

          2. I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.

          3. The main point, though, is that instead of rotating the axis I just use parametric plots. In my opinion this makes things simpler. If you insist on rotating axis environments, this can also be done, however then one faces usually the problem that the interpretations of above etc. become a bit unintuitive.

          4. As you see, I do most of the things with TikZ "only". In principle one could do this without pgfplots, but the price one may have to pay is that things like changing the size of the plot will become a tiny bit more complicated.

          5. I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)





          share|improve this answer






















            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            user171006 is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452102%2frotated-normal-distribution%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote













            Welcome to TeX.SE! Are you looking for something like this?



            documentclassarticle
            usepackagepgfplots
            pgfplotssetcompat=1.16
            begindocument
            begintikzpicture[font=sffamily,
            declare function=gauss(x,y,z)=1/(y*sqrt(2*pi))*exp(-((x-z)^2)/(2*y^2));]

            beginaxis[samples=101,smooth,hide axis,width=12cm]
            addplot [domain=-3:3] (gauss(x,0.8,0),x);
            addplot [domain=-3:3] (1+gauss(x,1.2,0),1+x);
            addplot [domain=-3:3] (2+gauss(x,0.6,0),x);

            draw (0,-3) -- (0,3) coordinate[pos=0.4](x1) coordinate[pos=0.5] (y1);
            draw (1,-2) -- (1,4) coordinate[pos=0.6](x2) coordinate[pos=0.5] (y2);
            draw (2,-3) -- (2,3) coordinate[pos=0.6](x3) coordinate[pos=0.5] (y3);
            addplot[-latex] coordinates(-0.5,-4) (3,-4);
            path (0,-4) coordinate (z1) (1,-4) coordinate (z2) (2,-4) coordinate (z3);
            coordinate (t) at (3,-4.1);
            endaxis
            foreach X in 1,2,3
            fill (xX) circle (2pt);
            draw ([xshift=-1mm]yX) -- ([xshift=1mm]yX);
            draw ([yshift=1mm]zX) -- ([yshift=-1mm]zX) node[below] $X$;
            node[anchor=north east] at (t) time;
            draw[blue,thick,shorten >=2mm,shorten <=2mm] (x1) -- (x2);
            draw[blue,thick,shorten >=2mm,shorten <=2mm] (x2) -- (x3);
            endtikzpicture
            enddocument


            enter image description here



            Comments:



            1. Is there any reason you want to use version 1.7? If so, one may have to slightly modify the syntax by adding axis cs: to some coordinates.

            2. I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.

            3. The main point, though, is that instead of rotating the axis I just use parametric plots. In my opinion this makes things simpler. If you insist on rotating axis environments, this can also be done, however then one faces usually the problem that the interpretations of above etc. become a bit unintuitive.

            4. As you see, I do most of the things with TikZ "only". In principle one could do this without pgfplots, but the price one may have to pay is that things like changing the size of the plot will become a tiny bit more complicated.

            5. I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)





            share|improve this answer


























              up vote
              4
              down vote













              Welcome to TeX.SE! Are you looking for something like this?



              documentclassarticle
              usepackagepgfplots
              pgfplotssetcompat=1.16
              begindocument
              begintikzpicture[font=sffamily,
              declare function=gauss(x,y,z)=1/(y*sqrt(2*pi))*exp(-((x-z)^2)/(2*y^2));]

              beginaxis[samples=101,smooth,hide axis,width=12cm]
              addplot [domain=-3:3] (gauss(x,0.8,0),x);
              addplot [domain=-3:3] (1+gauss(x,1.2,0),1+x);
              addplot [domain=-3:3] (2+gauss(x,0.6,0),x);

              draw (0,-3) -- (0,3) coordinate[pos=0.4](x1) coordinate[pos=0.5] (y1);
              draw (1,-2) -- (1,4) coordinate[pos=0.6](x2) coordinate[pos=0.5] (y2);
              draw (2,-3) -- (2,3) coordinate[pos=0.6](x3) coordinate[pos=0.5] (y3);
              addplot[-latex] coordinates(-0.5,-4) (3,-4);
              path (0,-4) coordinate (z1) (1,-4) coordinate (z2) (2,-4) coordinate (z3);
              coordinate (t) at (3,-4.1);
              endaxis
              foreach X in 1,2,3
              fill (xX) circle (2pt);
              draw ([xshift=-1mm]yX) -- ([xshift=1mm]yX);
              draw ([yshift=1mm]zX) -- ([yshift=-1mm]zX) node[below] $X$;
              node[anchor=north east] at (t) time;
              draw[blue,thick,shorten >=2mm,shorten <=2mm] (x1) -- (x2);
              draw[blue,thick,shorten >=2mm,shorten <=2mm] (x2) -- (x3);
              endtikzpicture
              enddocument


              enter image description here



              Comments:



              1. Is there any reason you want to use version 1.7? If so, one may have to slightly modify the syntax by adding axis cs: to some coordinates.

              2. I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.

              3. The main point, though, is that instead of rotating the axis I just use parametric plots. In my opinion this makes things simpler. If you insist on rotating axis environments, this can also be done, however then one faces usually the problem that the interpretations of above etc. become a bit unintuitive.

              4. As you see, I do most of the things with TikZ "only". In principle one could do this without pgfplots, but the price one may have to pay is that things like changing the size of the plot will become a tiny bit more complicated.

              5. I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)





              share|improve this answer
























                up vote
                4
                down vote










                up vote
                4
                down vote









                Welcome to TeX.SE! Are you looking for something like this?



                documentclassarticle
                usepackagepgfplots
                pgfplotssetcompat=1.16
                begindocument
                begintikzpicture[font=sffamily,
                declare function=gauss(x,y,z)=1/(y*sqrt(2*pi))*exp(-((x-z)^2)/(2*y^2));]

                beginaxis[samples=101,smooth,hide axis,width=12cm]
                addplot [domain=-3:3] (gauss(x,0.8,0),x);
                addplot [domain=-3:3] (1+gauss(x,1.2,0),1+x);
                addplot [domain=-3:3] (2+gauss(x,0.6,0),x);

                draw (0,-3) -- (0,3) coordinate[pos=0.4](x1) coordinate[pos=0.5] (y1);
                draw (1,-2) -- (1,4) coordinate[pos=0.6](x2) coordinate[pos=0.5] (y2);
                draw (2,-3) -- (2,3) coordinate[pos=0.6](x3) coordinate[pos=0.5] (y3);
                addplot[-latex] coordinates(-0.5,-4) (3,-4);
                path (0,-4) coordinate (z1) (1,-4) coordinate (z2) (2,-4) coordinate (z3);
                coordinate (t) at (3,-4.1);
                endaxis
                foreach X in 1,2,3
                fill (xX) circle (2pt);
                draw ([xshift=-1mm]yX) -- ([xshift=1mm]yX);
                draw ([yshift=1mm]zX) -- ([yshift=-1mm]zX) node[below] $X$;
                node[anchor=north east] at (t) time;
                draw[blue,thick,shorten >=2mm,shorten <=2mm] (x1) -- (x2);
                draw[blue,thick,shorten >=2mm,shorten <=2mm] (x2) -- (x3);
                endtikzpicture
                enddocument


                enter image description here



                Comments:



                1. Is there any reason you want to use version 1.7? If so, one may have to slightly modify the syntax by adding axis cs: to some coordinates.

                2. I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.

                3. The main point, though, is that instead of rotating the axis I just use parametric plots. In my opinion this makes things simpler. If you insist on rotating axis environments, this can also be done, however then one faces usually the problem that the interpretations of above etc. become a bit unintuitive.

                4. As you see, I do most of the things with TikZ "only". In principle one could do this without pgfplots, but the price one may have to pay is that things like changing the size of the plot will become a tiny bit more complicated.

                5. I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)





                share|improve this answer














                Welcome to TeX.SE! Are you looking for something like this?



                documentclassarticle
                usepackagepgfplots
                pgfplotssetcompat=1.16
                begindocument
                begintikzpicture[font=sffamily,
                declare function=gauss(x,y,z)=1/(y*sqrt(2*pi))*exp(-((x-z)^2)/(2*y^2));]

                beginaxis[samples=101,smooth,hide axis,width=12cm]
                addplot [domain=-3:3] (gauss(x,0.8,0),x);
                addplot [domain=-3:3] (1+gauss(x,1.2,0),1+x);
                addplot [domain=-3:3] (2+gauss(x,0.6,0),x);

                draw (0,-3) -- (0,3) coordinate[pos=0.4](x1) coordinate[pos=0.5] (y1);
                draw (1,-2) -- (1,4) coordinate[pos=0.6](x2) coordinate[pos=0.5] (y2);
                draw (2,-3) -- (2,3) coordinate[pos=0.6](x3) coordinate[pos=0.5] (y3);
                addplot[-latex] coordinates(-0.5,-4) (3,-4);
                path (0,-4) coordinate (z1) (1,-4) coordinate (z2) (2,-4) coordinate (z3);
                coordinate (t) at (3,-4.1);
                endaxis
                foreach X in 1,2,3
                fill (xX) circle (2pt);
                draw ([xshift=-1mm]yX) -- ([xshift=1mm]yX);
                draw ([yshift=1mm]zX) -- ([yshift=-1mm]zX) node[below] $X$;
                node[anchor=north east] at (t) time;
                draw[blue,thick,shorten >=2mm,shorten <=2mm] (x1) -- (x2);
                draw[blue,thick,shorten >=2mm,shorten <=2mm] (x2) -- (x3);
                endtikzpicture
                enddocument


                enter image description here



                Comments:



                1. Is there any reason you want to use version 1.7? If so, one may have to slightly modify the syntax by adding axis cs: to some coordinates.

                2. I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.

                3. The main point, though, is that instead of rotating the axis I just use parametric plots. In my opinion this makes things simpler. If you insist on rotating axis environments, this can also be done, however then one faces usually the problem that the interpretations of above etc. become a bit unintuitive.

                4. As you see, I do most of the things with TikZ "only". In principle one could do this without pgfplots, but the price one may have to pay is that things like changing the size of the plot will become a tiny bit more complicated.

                5. I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 1 hour ago

























                answered 1 hour ago









                marmot

                59.6k463128




                59.6k463128




















                    user171006 is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    user171006 is a new contributor. Be nice, and check out our Code of Conduct.












                    user171006 is a new contributor. Be nice, and check out our Code of Conduct.











                    user171006 is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452102%2frotated-normal-distribution%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    What does second last employer means? [closed]

                    One-line joke