Plotting this kind of graph in TikZ

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











up vote
2
down vote

favorite
1












I want to plot a graph that looks like this:





The graph needs to look like two bell curves. There's no specific functions or anything for it.



Here's what I have.



begintikzpicture
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] (0,0) to [out=0,in=180] (1,3);
draw[thick,color=blue] (1,3) to [out=0,in=180] (2,0);
draw[thick,color=blue] (2,0) to (4,0);
draw[thick,color=blue] (4,0) to [out=0,in=180] (5,3);
draw[thick,color=blue] (5,3) to [out=0,in=180] (6,0);
endtikzpicture


As you can see it doesn't really look like bell curves.



I'm very new to TikZ and this is the only way I know how to plot. Please help!










share|improve this question









New contributor




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



















  • Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
    – VÅ© Văn DÅ©ng
    5 hours ago










  • It's an arbitrarily drawn graph, no points whatsoever.
    – Steven Sun
    5 hours ago














up vote
2
down vote

favorite
1












I want to plot a graph that looks like this:





The graph needs to look like two bell curves. There's no specific functions or anything for it.



Here's what I have.



begintikzpicture
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] (0,0) to [out=0,in=180] (1,3);
draw[thick,color=blue] (1,3) to [out=0,in=180] (2,0);
draw[thick,color=blue] (2,0) to (4,0);
draw[thick,color=blue] (4,0) to [out=0,in=180] (5,3);
draw[thick,color=blue] (5,3) to [out=0,in=180] (6,0);
endtikzpicture


As you can see it doesn't really look like bell curves.



I'm very new to TikZ and this is the only way I know how to plot. Please help!










share|improve this question









New contributor




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



















  • Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
    – VÅ© Văn DÅ©ng
    5 hours ago










  • It's an arbitrarily drawn graph, no points whatsoever.
    – Steven Sun
    5 hours ago












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





I want to plot a graph that looks like this:





The graph needs to look like two bell curves. There's no specific functions or anything for it.



Here's what I have.



begintikzpicture
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] (0,0) to [out=0,in=180] (1,3);
draw[thick,color=blue] (1,3) to [out=0,in=180] (2,0);
draw[thick,color=blue] (2,0) to (4,0);
draw[thick,color=blue] (4,0) to [out=0,in=180] (5,3);
draw[thick,color=blue] (5,3) to [out=0,in=180] (6,0);
endtikzpicture


As you can see it doesn't really look like bell curves.



I'm very new to TikZ and this is the only way I know how to plot. Please help!










share|improve this question









New contributor




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











I want to plot a graph that looks like this:





The graph needs to look like two bell curves. There's no specific functions or anything for it.



Here's what I have.



begintikzpicture
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] (0,0) to [out=0,in=180] (1,3);
draw[thick,color=blue] (1,3) to [out=0,in=180] (2,0);
draw[thick,color=blue] (2,0) to (4,0);
draw[thick,color=blue] (4,0) to [out=0,in=180] (5,3);
draw[thick,color=blue] (5,3) to [out=0,in=180] (6,0);
endtikzpicture


As you can see it doesn't really look like bell curves.



I'm very new to TikZ and this is the only way I know how to plot. Please help!







tikz-pgf






share|improve this question









New contributor




Steven Sun 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




Steven Sun 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








edited 5 hours ago









Vũ Văn Dũng

1767




1767






New contributor




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









asked 6 hours ago









Steven Sun

112




112




New contributor




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





New contributor





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






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











  • Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
    – VÅ© Văn DÅ©ng
    5 hours ago










  • It's an arbitrarily drawn graph, no points whatsoever.
    – Steven Sun
    5 hours ago
















  • Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
    – VÅ© Văn DÅ©ng
    5 hours ago










  • It's an arbitrarily drawn graph, no points whatsoever.
    – Steven Sun
    5 hours ago















Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
– VÅ© Văn DÅ©ng
5 hours ago




Do you have more details, such as the value of v when t is 2,4,6,8 or 12,14,16,18... It will be easier to draw with those value
– VÅ© Văn DÅ©ng
5 hours ago












It's an arbitrarily drawn graph, no points whatsoever.
– Steven Sun
5 hours ago




It's an arbitrarily drawn graph, no points whatsoever.
– Steven Sun
5 hours ago










1 Answer
1






active

oldest

votes

















up vote
4
down vote













Welcome to TeX.SE! You can plot arbitrary functions. Note that you'd probably make your life more comfortable by drawing this with pgfplots.



documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] plot[domain=0:2,variable=x,samples=101]
(x,3*Gaussian(x,1,5));
draw[thick,color=blue] plot[domain=4:6,variable=x,samples=101]
(x,3*Gaussian(x,5,5));
endtikzpicture
enddocument


enter image description here



Just for fun: a quick pgfplots variant.



documentclass[tikz,border=3.14mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
beginaxis[axis lines=left,grid=major,xmin=0,xmax=72,ymin=0,ymax=22,
xlabel=$t$,ylabel=$v$]
addplot[domain=0:20,thick,blue,samples=101] 15*Gaussian(x,10,0.1);
addplot[domain=40:60,thick,blue,samples=101] 15*Gaussian(x,50,0.1);
endaxis
endtikzpicture
enddocument


enter image description here



You can of course adjust its appearance.






share|improve this answer






















  • Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
    – Steven Sun
    5 hours ago










  • @StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
    – marmot
    5 hours ago











  • What do you mean by "add multiple ticks by hand"?
    – Steven Sun
    4 hours ago










  • @StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
    – marmot
    4 hours ago










  • I see. Thank you sir.
    – Steven Sun
    4 hours ago










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: 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
);



);






Steven Sun 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%2f458189%2fplotting-this-kind-of-graph-in-tikz%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! You can plot arbitrary functions. Note that you'd probably make your life more comfortable by drawing this with pgfplots.



documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] plot[domain=0:2,variable=x,samples=101]
(x,3*Gaussian(x,1,5));
draw[thick,color=blue] plot[domain=4:6,variable=x,samples=101]
(x,3*Gaussian(x,5,5));
endtikzpicture
enddocument


enter image description here



Just for fun: a quick pgfplots variant.



documentclass[tikz,border=3.14mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
beginaxis[axis lines=left,grid=major,xmin=0,xmax=72,ymin=0,ymax=22,
xlabel=$t$,ylabel=$v$]
addplot[domain=0:20,thick,blue,samples=101] 15*Gaussian(x,10,0.1);
addplot[domain=40:60,thick,blue,samples=101] 15*Gaussian(x,50,0.1);
endaxis
endtikzpicture
enddocument


enter image description here



You can of course adjust its appearance.






share|improve this answer






















  • Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
    – Steven Sun
    5 hours ago










  • @StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
    – marmot
    5 hours ago











  • What do you mean by "add multiple ticks by hand"?
    – Steven Sun
    4 hours ago










  • @StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
    – marmot
    4 hours ago










  • I see. Thank you sir.
    – Steven Sun
    4 hours ago














up vote
4
down vote













Welcome to TeX.SE! You can plot arbitrary functions. Note that you'd probably make your life more comfortable by drawing this with pgfplots.



documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] plot[domain=0:2,variable=x,samples=101]
(x,3*Gaussian(x,1,5));
draw[thick,color=blue] plot[domain=4:6,variable=x,samples=101]
(x,3*Gaussian(x,5,5));
endtikzpicture
enddocument


enter image description here



Just for fun: a quick pgfplots variant.



documentclass[tikz,border=3.14mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
beginaxis[axis lines=left,grid=major,xmin=0,xmax=72,ymin=0,ymax=22,
xlabel=$t$,ylabel=$v$]
addplot[domain=0:20,thick,blue,samples=101] 15*Gaussian(x,10,0.1);
addplot[domain=40:60,thick,blue,samples=101] 15*Gaussian(x,50,0.1);
endaxis
endtikzpicture
enddocument


enter image description here



You can of course adjust its appearance.






share|improve this answer






















  • Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
    – Steven Sun
    5 hours ago










  • @StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
    – marmot
    5 hours ago











  • What do you mean by "add multiple ticks by hand"?
    – Steven Sun
    4 hours ago










  • @StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
    – marmot
    4 hours ago










  • I see. Thank you sir.
    – Steven Sun
    4 hours ago












up vote
4
down vote










up vote
4
down vote









Welcome to TeX.SE! You can plot arbitrary functions. Note that you'd probably make your life more comfortable by drawing this with pgfplots.



documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] plot[domain=0:2,variable=x,samples=101]
(x,3*Gaussian(x,1,5));
draw[thick,color=blue] plot[domain=4:6,variable=x,samples=101]
(x,3*Gaussian(x,5,5));
endtikzpicture
enddocument


enter image description here



Just for fun: a quick pgfplots variant.



documentclass[tikz,border=3.14mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
beginaxis[axis lines=left,grid=major,xmin=0,xmax=72,ymin=0,ymax=22,
xlabel=$t$,ylabel=$v$]
addplot[domain=0:20,thick,blue,samples=101] 15*Gaussian(x,10,0.1);
addplot[domain=40:60,thick,blue,samples=101] 15*Gaussian(x,50,0.1);
endaxis
endtikzpicture
enddocument


enter image description here



You can of course adjust its appearance.






share|improve this answer














Welcome to TeX.SE! You can plot arbitrary functions. Note that you'd probably make your life more comfortable by drawing this with pgfplots.



documentclass[tikz,border=3.14mm]standalone
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
draw[very thin,color=lightgray,step=0.5cm] (0,0) grid (6.1,3.6);
draw[->] (0,0) -- (6.2,0) node[anchor=north] $t$;
draw[->] (0,0) -- (0,3.7) node[anchor=east] $v$;
draw
(0,0) node[anchor=north] 0
(1,0) node[anchor=north] 10
(2,0) node[anchor=north] 20
(3,0) node[anchor=north] 30
(4,0) node[anchor=north] 40
(5,0) node[anchor=north] 50
(0,1) node[anchor=east] 5
(0,2) node[anchor=east] 10
(0,3) node[anchor=east] 15;
draw[thick,color=blue] plot[domain=0:2,variable=x,samples=101]
(x,3*Gaussian(x,1,5));
draw[thick,color=blue] plot[domain=4:6,variable=x,samples=101]
(x,3*Gaussian(x,5,5));
endtikzpicture
enddocument


enter image description here



Just for fun: a quick pgfplots variant.



documentclass[tikz,border=3.14mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
begintikzpicture[declare function=Gaussian(x,y,z)=exp(-z*(x-y)*(x-y));]
beginaxis[axis lines=left,grid=major,xmin=0,xmax=72,ymin=0,ymax=22,
xlabel=$t$,ylabel=$v$]
addplot[domain=0:20,thick,blue,samples=101] 15*Gaussian(x,10,0.1);
addplot[domain=40:60,thick,blue,samples=101] 15*Gaussian(x,50,0.1);
endaxis
endtikzpicture
enddocument


enter image description here



You can of course adjust its appearance.







share|improve this answer














share|improve this answer



share|improve this answer








edited 5 hours ago

























answered 5 hours ago









marmot

71.2k476151




71.2k476151











  • Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
    – Steven Sun
    5 hours ago










  • @StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
    – marmot
    5 hours ago











  • What do you mean by "add multiple ticks by hand"?
    – Steven Sun
    4 hours ago










  • @StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
    – marmot
    4 hours ago










  • I see. Thank you sir.
    – Steven Sun
    4 hours ago
















  • Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
    – Steven Sun
    5 hours ago










  • @StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
    – marmot
    5 hours ago











  • What do you mean by "add multiple ticks by hand"?
    – Steven Sun
    4 hours ago










  • @StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
    – marmot
    4 hours ago










  • I see. Thank you sir.
    – Steven Sun
    4 hours ago















Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
– Steven Sun
5 hours ago




Ahh. Thanks. I love the pgfplots variant. May I know when I should use tikz and when I should use pgfplots? Is there any resources where I can look up examples for both tikz and pgfplots?
– Steven Sun
5 hours ago












@StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
– marmot
5 hours ago





@StevenSun There is no rule when to use what. However, I'd like to argue that, if one starts to add multiple ticks by hand, it is time to gauge whether one is better off with pgfplots. Both the pgfmanual and the pgfplots manual are very nicely written. Additional examples can be found on this site and on TeXample as well as pgfplots.
– marmot
5 hours ago













What do you mean by "add multiple ticks by hand"?
– Steven Sun
4 hours ago




What do you mean by "add multiple ticks by hand"?
– Steven Sun
4 hours ago












@StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
– marmot
4 hours ago




@StevenSun In your example, you have draw (0,0) node[anchor=north] 0 ...., the analogous lines are not there in the pgfplots variant.
– marmot
4 hours ago












I see. Thank you sir.
– Steven Sun
4 hours ago




I see. Thank you sir.
– Steven Sun
4 hours ago










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









 

draft saved


draft discarded


















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












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











Steven Sun 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%2f458189%2fplotting-this-kind-of-graph-in-tikz%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke