Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
10 user(s) are online (9 user(s) are browsing encyclopedia)

Members: 0
Guests: 10

more...
partner

PSTricks

PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX code.

= Basic usage =

There is a wide list of commands available for making graphics. Coordinates in PSTricks are always represented in round parenthesis as the following example (scaled) illustrates.

egin{pspicture}(0,0)(6,6)%psgrid[gridcolor=lightgray,gridlabels=0pt] psline[linecolor=red](1,1)(5,1)(1,4)(1,1) pscurve[linecolor=green,linewidth=2pt,showpoints=true](5,5)(3,2)(4,4)(2,3) pscircle[linecolor=blue,linestyle=dashed](3,2.5){1} end{pspicture}

= Extensions =

PSTricks commands are low level, so many LaTeX packages have been made in order to ease the creation of several kinds of graphics that are commonly used on mathematical typesetting.

pst-plot provides commands for creating Function (mathematics) graphs. Consider the following example egin{pspicture*}(-7.5,-3)(7.5,3) psaxes[labels=none](0,0)(-7,-2)(7,2) psplot[linecolor=blue, linewidth=1.5pt]{-7}{7}{x 0.01745329252 div sin} uput[45](3.1415926,0){$pi$} uput[90](-1.570796,0){$-pi/2$} uput[-90](1.570796,0){$pi/2$} uput[-135](-3.1415926,0){$-pi$} psline[linewidth=1pt,linecolor=red,linestyle=dotted](1.57079632,1)(1.57079632,0) psline[linewidth=1pt,linecolor=red,linestyle=dotted](-1.57079632,-1)(-1.57079632,0) end{pspicture*}

The previous example also illustrate that TeX commands can be used as elements into the pictures. Since PostScript uses RPN style for mathematical operations, the argument to pst-plot must be supplied in the same form.

pstricks-add extends pst-plot enabling also Polar coordinates graphs and allowing the use algebraic notation for plots instead of RPN.

pst-math provides trigonometric functions in radians (since PostScript defaults to using degree (angle)s) an hyperbolic trigonometric functions.

pst-plot3d is used for creating 3D graphics like the following:

multido provides basic loop functionality for programming graphs with repeating elements:

pst-eucl is a beta extension for easy creation of geometry drawings.

There are many other extensions, for drawing Circuit diagrams, Graph (mathematics), Tree (graph theory), visualizing data, etc.

= See also =

  • TeX
  • LaTeX
  • PostScript
  • =External links=

  • The official [http://pstricks.de PSTricks] site.
  • PSTricks [http://perce.de/LaTeX/pstricks/pst-docfull.pdf user guide].
  • PSTricks [http://tug.org/PSTricks/main.cgifile=docs documentation].
  • PSTricks [http://tug.org/PSTricks/main.cgifile=examples examples].