contentscomedy.dante.de/~herbert/books/pstricks-en-contents.pdf · 2017. 9. 4. · figure 36.2:...
TRANSCRIPT
ii
“buch” — 2010/8/13 — 9:46 — page v — #5 ii
ii
ii
Contents
1 Introduction 31.1 The history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 The core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Getting to grips with PSTricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 Knowing its limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 Using this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 First steps 72.1 Colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Setting parameters and star versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3 Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.4 Measures and lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.5 pspicture environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.6 Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3 The Coordinate System 313.1 Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.3 Command \psgrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.4 Special cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.5 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4 Lines and polygons 434.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.2 \psline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524.3 \qline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534.4 \pspolygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534.5 \psframe and \psTextFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.6 \psdiamond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.7 \pstriangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
ii
“buch” — 2010/8/13 — 9:46 — page vi — #6 ii
ii
ii
Contents
5 Circles, ellipses, and curves 575.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575.2 Circles and ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605.3 Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6 Dots 696.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696.2 \psdot and \psdots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726.3 TEXnicalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
7 Filling 797.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797.2 “Semi-transparent” colours. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.3 Circular colour gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
8 Arrows 918.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.2 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9 Labels 1039.1 Alignment reference points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039.2 Angle of rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049.3 Label separation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049.4 \rput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059.5 \multirput and \rmultiput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059.6 \uput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069.7 \Rput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079.8 \cput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089.9 \multips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
10 Boxes 10910.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11010.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11110.3 Box size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11310.4 Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11410.5 Rotating and scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11610.6 Mathematics and verbatim boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11810.7 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
11 Custom styles and objects 12111.1 Custom styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12111.2 Custom objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12211.3 \pscustom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
12 Coordinates 13912.1 DeVning Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13912.2 Angle speciVcations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
vi
ch0-titel.tex: (#61) herbert
ii
“buch” — 2010/8/13 — 9:46 — page vii — #7 ii
ii
ii
Contents
12.3 Obsolete commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14512.4 Examples for \SpecialCoor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
13 Overlays 14713.1 Slides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14713.2 Overwriting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
14 Basics 15114.1 Header Vles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15114.2 Special commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15214.3 “Low-level” commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15714.4 “High-level” commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16014.5 “key value” interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
15 pst-plot: Plotting functions and data 16515.1 Coordinate axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16615.2 Plot styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19715.3 Plotting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20315.4 Plotting data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21215.5 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
16 pst-node: Nodes and connections 22516.1 Node names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22616.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22616.3 Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23616.4 Connections using \nc commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24116.5 Connections using \pc commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25216.6 Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25316.7 Special cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25616.8 \psmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25716.9 TEX and PostScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26216.10 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
17 pst-tree: Trees 26517.1 Parameters for tree nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26617.2 Tree nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27717.3 Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28017.4 \skiplevel and \skiplevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28317.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28417.6 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
18 pst-text – Manipulate text and characters 28718.1 Text manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28718.2 Character manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29018.3 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
19 pst-fill – Filling and tiling 29519.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
ch0-titel.tex: (#61) herbert
vii
ii
“buch” — 2010/8/13 — 9:46 — page viii — #8 ii
ii
ii
Contents
19.2 \psboxfill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30019.3 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
20 pst-coil – Coils, springs, and zigzag lines 30320.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30320.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30920.3 Node connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31020.4 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
21 pst-eps – Exporting PSTricks environments 31321.1 TeXtoEPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31421.2 \PSTtoEPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31421.3 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31521.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
22 pst-grad and pst-slpe – Colour gradients and shadows 31722.1 pst-grad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31722.2 pst-slpe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32022.3 pst-blur – Blurred shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32822.4 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
23 Three-dimensional Vgures 33323.1 pst-3d – Shadows, tilting, and three-dimensional illustrations. . . . . . . . . . . . 33423.2 pst-ob3d – Simple three-dimensional objects . . . . . . . . . . . . . . . . . . . . . . . 34623.3 pst-gr3d – Three-dimensional grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34823.4 pst-fr3d – Buttons with 3D eUects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35523.5 pst-3dplot – 3D parallel projection of functions and data . . . . . . . . . . . . . . 35823.6 pst-solides3d — perspective 3D views . . . . . . . . . . . . . . . . . . . . . . . . . . . 39123.7 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
24 pst-circ – Creation of circuits 44524.1 How it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44524.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44624.3 The objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44724.4 Logical elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45724.5 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
25 pst-geo – Geographic projections 46525.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46625.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46725.3 pst-map2d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47625.4 pst-map3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47825.5 pst-map2dII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48725.6 pst-map3dII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48925.7 \mapput and \pnodeMap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49125.8 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
viii
ch0-titel.tex: (#61) herbert
ii
“buch” — 2010/8/13 — 9:46 — page ix — #9 ii
ii
ii
Contents
26 pst-barcode – Bar codes 49726.1 The options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49726.2 Types of bar code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
27 pst-bar – bar charts 50927.1 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50927.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50927.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
28 Mathematical functions 51728.1 pst-math – Extended PostScript functions . . . . . . . . . . . . . . . . . . . . . . . . . 51728.2 pst-func – Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
29 pst-eucl – Euclidean geometry 55129.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55129.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56329.3 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
30 pstricks-add – Extended basic functions 58130.1 Mathematical functions at TEX level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58130.2 New commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58430.3 Node types and lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59630.4 Commands and options to plot data and functions . . . . . . . . . . . . . . . . . . . 601
31 pst-labo – Chemical instruments 61931.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61931.2 PredeVned colours and styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63231.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63331.4 Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
32 UML diagrams 64132.1 pst-uml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64132.2 uml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
33 Further PSTricks packages 65933.1 Linguistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65933.2 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66633.3 Natural sciences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68333.4 Information technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72433.5 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73133.6 multido . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
34 Special applications . . . 73934.1 Gouraud shading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73934.2 Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
35 PSTricks in presentations 74735.1 powerdot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74735.2 beamer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
ch0-titel.tex: (#61) herbert
ix
ii
“buch” — 2010/8/13 — 9:46 — page x — #10 ii
ii
ii
Contents
36 Examples 769
A Tables 819A.1 Summary of parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819A.2 Summary of all commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
B PostScript 839B.1 The mathematical PostScript functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 839B.2 The non-mathematical PostScript functions . . . . . . . . . . . . . . . . . . . . . . . . 840B.3 The PostScript deVnitions of pstricks.pro . . . . . . . . . . . . . . . . . . . . . . . . 844B.4 The names of the PSTricks dictionaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
C Known problems 847C.1 pstricks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847C.2 pst-plot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848C.3 pst-node. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
D PDF output 851D.1 ps2pdf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852D.2 pst-pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852D.3 auto-pst-pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855D.4 pdftricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
E Errors and help 857E.1 Frequent errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857E.2 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858E.3 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
Index of Commands and Concepts 867
People 903
x
ch0-titel.tex: (#61) herbert
ii
“buch” — 2011/4/5 — 9:46 — page 769 — #781 ii
ii
ii
C h a p t e r 36
Examples
The examples in this chapter have been randomly selected with the intention of providing ageneral overview of what’s possible with PSTricks. There are many more examples on theoXcial homepage http://PSTricks.tug.org or on Syracuse: http://melusine.eu.org/syracuse/pstricks/. The source code for the examples is, as usual, available for generaldownload on ctan or on the PSTricks website.
36-00-1
ΠΠΣT
ιχκσΠΣTριχκσ
ιχκσΠΣTριχκσΠ
ιχκσΠΣTριχκσΠΣTρ
ριχκσΠΣTριχκσΠΣTριχκσ
TριχκσΠΣTριχκσΠΣTριχκσΠ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
TριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
TριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣT
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
TριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣT
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠ
ριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣT
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠ
ριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠ
ριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTρ
TριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣT
ιχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣ
ΠΣTριχκσΠΣTριχκσΠΣTριχκσΠΣTριχκσΠ
Figure 36.1: PSTricks written with the symbol font
36-00-2z
x
yy
bb
b
Figure 36.2: Dice (pst-solides3d)
ii
“buch” — 2011/4/5 — 9:46 — page 770 — #782 ii
ii
ii
36 Examples
Pe
Rs Is2
GFe E2s RR Ir2
Ptr =ω
nCe
attr
ωm
nCe
Pu
36-00-3
Figure 36.3: Energy diagram of an asynchronous motor
0
.2
.4
0 5 10 15 20 25 30 35 40 45 50 55k
P(X = k) 36-00-4
Figure 36.4: Binomial distributions (pst-func)
0.2
0.4
1 2 3−1−2−3
36-00-5
Figure 36.5: Using the pst-math package
770
ch50-Beispiele-en.tex: (#167) herbert
ii
“buch” — 2011/4/5 — 9:46 — page 771 — #783 ii
ii
ii
Examples
36-00-6
Language
EthnicGrp
Religion
City
Organization
Country
Continent
Province
Lake
River
Sea
Mountain
Island
Desert
is_capital
is_capital
in
of
is_mem
ber
has_hq_in
encompasses
borders
A B
in in in in in inat at at
Wowsinto
main
trib.
mergesA
B
belong
believe
speak
nam
epop. longitude
latitude
abbrev
nam
e
establ.
type
length
nam
e
code
pop.
area
gov.
inW.
gdp
pop.grw
inf.mort
gdp.agr
gdp.serv
gdp.ind
governm.
nam
earea
nam
e
percent
nam
e
percent
nam
e
percent
percent
nam
e
pop.
area
nam
earea
nam
e
length
nam
edepth
nam
eheight
geo
coord
longitude
latitude
nam
eislands
geo
coord
longitude
latitude
nam
e
area
Figure 36.6: Complex example for the pst-dbicons package (Wolfgang May)
ch50-Beispiele-en.tex: (#167) herbert
771
ii
“buch” — 2011/4/5 — 9:46 — page 772 — #784 ii
ii
ii
36 Examples
text parameter result
XSUS_G -.-.-.-.-.-.-.-.-.-.-
XPR_U1 ..--..--..--..--..--.
XPR_U2 ....----....----....-
36-00-7
Figure 36.7: DeVnition of special commands
A great many people have never heard the
scream of an eagle. The only voice they con-
nect with the kind of the air is a ludicrously fee-
ble squawk, dim with distance, but in his great mo-
ments the eagle has a war-cry like that of the hawk, but
harsher, hoarser, tenfold in volume. This sound cut into the
night in the gulch, and Vic Gregg started and glanced about for
echoes made the sound stand at his side; then
he looked up, and saw two eagles Vghting in
the light of the morn- ing. He knew what it
meant–the beginning of the mating season,
and these two battling for a prize. They darted
away. They Washed to- gether with reaching
talons and gaping beaks, and dropped in a tu-
mult of wings, then soared and clashed
once more until one of them folded his wings
and dropped bulletlike out of the morning into
the night. Close over Gregg’s head, the wings
Wirted out–ten feet from tip to tip–beat down with a great wash-
ing sound, and the bird shot across the valley in a level Wight.
The conqueror screamed a long insult down the hollow.
For a while he balanced, craning his bald head as if he
sought applause, then, without visible movement of
his wings, sailed away over the peaks. A feather
Wuttered slowly down past Vic Gregg.
36-00-8
Figure 36.8: Using \rput, \pscircle, and \psarc (Idea by Thomas Siegel)
~r
~F
36-00-9
Figure 36.9: Using \rput, \pscircle, \psarc, and \psellipticarc
772
ch50-Beispiele-en.tex: (#167) herbert
ii
“buch” — 2011/4/5 — 9:46 — page 773 — #785 ii
ii
ii
Examples
36-00-10
First line.
Second line.
0 1 2 30
1
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
First line.
Second line.
Figure 36.10: Verbatim mode in diUerent boxes (Denis Girou)
36-00-11 GraVc project
Input
Figure 36.11: Using \psframe and \rput
36-00-12
0 1 2 3 4 5 6 7 8 9 10
5 6 7 8 9 10
Figure 36.12: Labelling axes with pst-plot
ch50-Beispiele-en.tex: (#167) herbert
773
ii
“buch” — 2011/4/5 — 9:46 — page 774 — #786 ii
ii
ii
36 Examples
Enlèvement burinant
Marche
Plume
Charnière
Languette
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
0 1 2 3 4 5 6 7 8 9 10 11 12
Nombre
depièces
Longueur de la trace en mm
36-00-13
Figure 36.13: Overlays of Vlled areas
A C E G I
B
D
F
H
J
lineIline
IIline
IIIline
IVline
V
36-00-14
Figure 36.14: Node connections with a constant angle (pst-node)
774
ch50-Beispiele-en.tex: (#167) herbert
ii
“buch” — 2011/4/5 — 9:46 — page 775 — #787 ii
ii
ii
Examples
36-00-15
Figure 36.15: Using \psclip and the \random command (pstricks, Manuel Luque)
36-00-16
Figure 36.16: Using the \random command (pst-labo, Manuel Luque).
36-00-17y = x2
+ bx + c
= x2+ 2 ·
b
2x + c
= x2+ 2 ·
b
2x +
(b
2
)2
︸ ︷︷ ︸
−
(b
2
)2
+ c
(
x +b
2
)2
=
(
x +b
2
)2
−
(b
2
)2
+ c
∣∣∣∣∣+
(b
2
)2
− c
y +
(b
2
)2
− c =
(
x +b
2
)2 ∣∣(Scheitelpunktform)
y −yS = (x − xS)2
S(
xS;yS
)
bzw. S
−b
2;
(
b
2
)2
− c
Figure 36.17: A grid . . .
ch50-Beispiele-en.tex: (#167) herbert
775
ii
“buch” — 2011/4/5 — 9:46 — page 776 — #788 ii
ii
ii
36 Examples
epistemische Indizes
faktische Indizes
realistische
Indizes
36-00-18
Figure 36.18: Clipping
Some text in a box
Some text in a box
with line arcs only
on the left side
36-00-19
Figure 36.19: Boxes with diUerent corners
36-00-20
Figure 36.20: Special paper with \psgrid and subgriddiv
776
ch50-Beispiele-en.tex: (#167) herbert
ii
“buch” — 2011/4/5 — 9:46 — page 777 — #789 ii
ii
ii
Examples
36-00-211
−1
π 2π 3π 4π 5π 6π 7π 8π 9π 10π 11π 12π−π
Figure 36.21: Trigonometrical units with pst-plot
36-00-22
0 1 2 3 4 5 6 7 80
1
2
3
4
b
b
b
b
b
bb
b
b
b
b
b
b
b
b
b
Figure 36.22: Using \psccurve with the eofill Vll style
36-00-23
bcbcbcbc bc bcbcbcbcbc
bcbcbc bc
bc
bc
bc bcbc
bcbcbc
bcbc bc
Figure 36.23: Objects from pst-labo
ch50-Beispiele-en.tex: (#167) herbert
777
ii
“buch” — 2011/4/5 — 9:46 — page 778 — #790 ii
ii
ii
36 Examples
PSTricks
36-00-24
Figure 36.24: Transparency
360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800
γ = 0.4
360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800
γ = 0.6
360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800
γ = 0.8
360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800
γ = 1.0
360 380 400 420 440 460 480 500 520 540 560 580 600 620 640 660 680 700 720 740 760 780 800
γ = 1.2
36-00-25
Figure 36.25: Using the wave colour model
778
ch50-Beispiele-en.tex: (#167) herbert