Rotated Normal Distribution
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I`m trying to create a rotated normal distribution similar to this:
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
New contributor
add a comment |Â
up vote
1
down vote
favorite
I`m trying to create a rotated normal distribution similar to this:
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
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I`m trying to create a rotated normal distribution similar to this:
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
New contributor
I`m trying to create a rotated normal distribution similar to this:
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
tikz-pgf pgfplots
New contributor
New contributor
New contributor
asked 2 hours ago
user171006
61
61
New contributor
New contributor
add a comment |Â
add a comment |Â
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
Comments:
- Is there any reason you want to use version
1.7
? If so, one may have to slightly modify the syntax by addingaxis cs:
to some coordinates. - I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.
- 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. - 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.
- I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)
add a comment |Â
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
Comments:
- Is there any reason you want to use version
1.7
? If so, one may have to slightly modify the syntax by addingaxis cs:
to some coordinates. - I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.
- 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. - 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.
- I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)
add a comment |Â
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
Comments:
- Is there any reason you want to use version
1.7
? If so, one may have to slightly modify the syntax by addingaxis cs:
to some coordinates. - I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.
- 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. - 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.
- I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)
add a comment |Â
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
Comments:
- Is there any reason you want to use version
1.7
? If so, one may have to slightly modify the syntax by addingaxis cs:
to some coordinates. - I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.
- 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. - 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.
- I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)
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
Comments:
- Is there any reason you want to use version
1.7
? If so, one may have to slightly modify the syntax by addingaxis cs:
to some coordinates. - I modified the way the Gaussian function is declared to a syntax that is arguably a bit easier to deal with.
- 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. - 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.
- I kicked out packages that were not needed here. (Note that pgfplots loads TikZ.)
edited 1 hour ago
answered 1 hour ago
marmot
59.6k463128
59.6k463128
add a comment |Â
add a comment |Â
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.
user171006 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password