[pstricks] Scaling, \psaxes, and \psplot

rossi at york.cuny.edu rossi at york.cuny.edu
Sat Mar 12 17:51:14 CET 2005


Hello:

The file enclosed below plots the Maxwell-Boltzmann velocity probability
distribution for a sample of gas at 300 K and molar mass 40 g/mol.

But the y-axis scale is too small.  

I always approached scaling for \psplot/\psaxes by the following recipe:

(value for yunit) x (actual value of y in the function) = size of graph in cm

But the probability distribution (i.e. the y-axis) is very small, and so yunit
is as large as it can be, i.e. 500 cm.  And the graph of the distribution shown
on the y-axis is very shallow.  I want it to look like a large camel's hump.

This can't be right. I shouldn't be using such a large value for yunit.

\psset{yunit=500cm}

What am I doing wrong?  How do I plot functions that have very small values and
yet get graphs that look reasonable?

Regards,

Angelo  



\documentclass[12pt,a4paper]{article} 
\listfiles
\usepackage{amsmath}
\usepackage{pst-plot}
\usepackage{pstricks-add}
                                                                                
                                                              
\begin{document}
                                                                                
                                                              
\psset{xunit=0.01cm, yunit=500cm}
\begin{pspicture}(0,0)(1000.,0.005)
%  \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
  \psaxes[Dx=100., Dy=0.00075]{->}(0,0)(1100,0.005)
  \psplot[linecolor=red, plotstyle=curve, linewidth=2pt]{0.00}{1100.}{%
    /e 2.718282 def
    /const1  3.30 10 8 neg exp mul def
    /s 10 1 exp def
    /const2  6.04 10 6 neg exp mul def
     const1 x x mul mul e const2 neg x x mul mul exp mul}
\end{pspicture}
                                                                                
                                                              \end{document}







Scanned for Malware by York College/CUNY




More information about the PSTricks mailing list