Graphics, Figures & Tables ⇒ Maxwell-Boltzmann Distribution Graph
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Maxwell-Boltzmann Distribution Graph
How can one plot a Maxwell Distribution function in LaTeX? I want to make a similar graph like in this attached image file so that I can work on adding some more information on it with my document. Thanks.
- Attachments
-
- function.PNG (28.18 KiB) Viewed 11226 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Maxwell-Boltzmann Distribution Graph
I suggest to use either pgf/tikZ or pst-plot (based on pstricks). You know the mathematical function for this distribution so that it should be no big deal to plot it and add annotations.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
Maxwell-Boltzmann Distribution Graph
pgfplots is also worth a mention.
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Maxwell-Boltzmann Distribution Graph
I don't know the mathematical function for this distribution unfortunately. But can those packages plot ANY function? and will they plot every value or discrete values for equations with one variable?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Maxwell-Boltzmann Distribution Graph
Maxwell–Boltzmann distribution - Wikipedia, the free encyclopediaghostanime2001 wrote:I don't know the mathematical function for this distribution unfortunately. […]
Explain "any" in this context. With the packages I suggested in my earlier reply you can plot smooth functions with at least one variable. With the pgfplots package that Torbjorn suggested you can also plot three-dimensional functions. The same applies to pst-3dplot. For more information about the capabilities of those packages please consult their manuals. Feel free to ask further questions along with a presentation of a serious approach you did on your own.ghostanime2001 wrote:[…] But can those packages plot ANY function? and will they plot every value or discrete values for equations with one variable?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Maxwell-Boltzmann Distribution Graph
By 'any' I mean complicated math expressions as well as simple functions and parametric curves too.
Some of the environments in ps-3dplot don't work when I insert the codes into TeXworks. But it works in TeXnicCenter. I would like to make it work in TeXworks thx
Some of the environments in ps-3dplot don't work when I insert the codes into TeXworks. But it works in TeXnicCenter. I would like to make it work in TeXworks thx
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Maxwell-Boltzmann Distribution Graph
All applicable packages have been mentioned. Refer to their manuals to learn more about their capabilities.ghostanime2001 wrote:By 'any' I mean complicated math expressions as well as simple functions and parametric curves too. […]
Due to its built-in PDF viewer TeXworks only supports compiler engines that directly produce PDF output. But PSTricks does not work with e. g. PDFLaTeX directly [1]. So either include the auto-pst-pdf package or set the »pdf« option for the pstricks package. See the manual for details. You could also run XeLaTeX directly on PSTricks code.ghostanime2001 wrote:[…] Some of the environments in ps-3dplot don't work when I insert the codes into TeXworks. But it works in TeXnicCenter. I would like to make it work in TeXworks thx
[1] /PSTricks/pdf/pdfoutput
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Maxwell-Boltzmann Distribution Graph
So using XeTeX I can run pstricks and Tikz visually like Texworks? Btw.. how can I install XeTeX?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Maxwell-Boltzmann Distribution Graph
Xe(La)TeX is part of your TeX distribution.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Maxwell-Boltzmann Distribution Graph
The maxwell distribution function for kinetic energy vs. number of molecules is this right ? http://hyperphysics.phy-astr.gsu.edu/hb ... pe.html#c1 Under the category of "Velocity Distribution in One Dimension" ???