PSTricks

From Wikipedia, the free encyclopedia

PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX code. It is originally the work of Professor Timothy Van Zandt and in recent years it has been maintained by Denis Girou, Sebastian Rahtz and Herbert Voss.

Contents

PSTricks example (scaled)
PSTricks example (scaled)

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.

\begin{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}

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 graphs. Consider the following example

\begin{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*}
Plotting sin(x) with pst-plot
Plotting sin(x) with pst-plot

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 graphs and allowing the use algebraic notation for plots instead of RPN.

pst-math provides trigonometric functions in radians (since PostScript defaults to using degrees) and hyperbolic trigonometric functions.

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

Hyperbolic paraboloid drawn using PSTricks package pst-plot3d
Hyperbolic paraboloid drawn using PSTricks package pst-plot3d

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

Ploting a graph while varying parameters with multido
Ploting a graph while varying parameters with multido

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

Circumcircle of a triangle, illustrated with pst-eucl
Circumcircle of a triangle, illustrated with pst-eucl

There are many other extensions, for drawing Circuit diagrams, graphs, trees, visualizing data, etc.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.