PSTricks - Graphics for T<span class="e">e</span>X and L<span class="a">a</span>T<span class="e">e</span>X

Welcome to the PSTricks web site

pst-plot -- Math function examples
TUG logo

Main page

Bug list
Doc errors
2D Gallery
3D Gallery
Search CTAN:



Extended translation of the the 5th edition


the 7th edition, total of 960 colored pages


2nd edition, 212 pages, includes 32 color pages










3D examples | 
arccos(x) |  Axes | 
Bessel curves | 
Chirikov function |  Clipping math functions |  Cubic root | 
Differential equations |  Discontinued plots | 
filling areas between two curves |  Fixpoint | 
Gaußcurve |  Grid -- redefinition |  Gridstyle | 
Hyperbola | 
Integer function |  Interrupted x-axis |  Introduction |  Iterated curves | 
Label position  |  Label step  |  Lissajous figure  |  ln(x)  |  Logarithmic axes | 
Maxwell-Boltzmann velocity probability  |  Multiple axes | 
Oscillator function |  Quantum harmonics oscillator | 
Parabola |  Parametric plots |  Plot of arccos(x) |  Plot of arctan(x) |  Plot of sin(1/x) |  Plot of sin(x)/x) |  Polynomial function |  PostScript procedures |  Printing function values | 
Quantum harmonics oscillator | 
Random noise |  Reciprocal function |  Riemann function |  Root sqrt[3]{x} |  RPN-Expression converter | 
Save calculated points in a file |  Simple Examples  |  sin(1/x) |  sin(x)/x) |  sin function with a random noise |  shaded areas under a curve |  Special coordinates |  Step function (Riemann) | 
tan(x) |  Tractrix curve |  Trigonometric labels | 

Chirikov function


Lissajous figure
tractrix0.png lissajous.png

Iterated curves Fun :-)
pst-plotDemo7.png pst-plotDemo21.png

Sometimes it may be useful to save every single (x|y) data record of an external file as a node to draw lines or something else from point to point. The following example first saves all points (plotpoints=20) of a circle in an external file This is done by PostScript(!), this is the reason why you have to run the PS-output once with ghostscript to build this file. In a second run the document reads the data file, saves all data records as nodes N<#>, plots it with the fileplot macro. After that all nodes are just for fun connected by a line with each other.
The files needs the package pstricks-add for the modulo function to draw all this lines:



Oscillator function
pst-plotDemo12.png exa014.png

(The zeros are calculated and marked by the macro)
The inverse function of tan(x), the atan(x), has the syntax y=atan(nominator/demoninator) and the values are in the range of 0..360. This is in difference to the default definition of -90...+90. The following example shows a plot which uses this last definition (needs pstricks-add). For the plot of a tan(x) go here It is also possibe to get the same result with the \parametricplot macro, which is shown in the above source file and pdf.

acrcos x Reciprocal function
arccos.png Demo13.png

This examples shows an extremely number of plotted points. The first plot has 3000 and the second one 4000, divided in two intervals of 3000 and 1000. This example shows, that there are nearly no restrictions in setting the plotpoints=??? option.


sin(x)/x Special coordinates
demo14.png pst-plotDemo4.png

Parametric plots
parametric1.png paraplot0.png parametric0.png
exa001.png exa016.png

pst-plotDemo10.png 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.

Parabola Hyperbola
pst-plotDemo11.png pst-plotDemo9.png

pst-plotDemo21.png pst-plotDemo21.png

Natural logarithm Integer function
pst-plotDemo15.png plot20.png

Shaded areas between curves
fillBetweenCurves0.png plot19.png exa010.png

Shaded areas under a curve
fillUnderCurve.png area0.png

Printing function values
pst-plotDemo17.png area0.png

Clipping math functions sin with a random noise Special Grid
Plotting math functions with pst-plot is given by the range xMin<x>xMax. When there are y values out of the by pspicture defined area, then it is easier to clip the plotting area instead of guessing the minimal and maximal useful x value. The example shows different possibilities to clip the plotting area.
pst-plotDemo18.png plot21.png exa005.png

Step functions Quantum harmonics oscillator
pst-plotDemo18.png exa009.png

There is also a macro \psFixpoint in the package pst-plot which allows easier solution than these two ones which work with \multuido.
fixPoint0.png fixPoint1.png

Discontinued plots with yMaxValue option
plot0.png plot1.png

Tangens with pst-plot Cubic root
tan0.png exa000.png

local time: Mon Jul 22 05:50:10 CEST 2024 ; file is: 657.517164351852 days old
contact webmaster _at_