To use PSTricks you must include the following lines in the preamble of your document.
We should mention that there have been some incompatibilities between the pstcol package (used by PSTricks) and the
graphics packages mentioned above.
Using colors with PSTricks is similar to what has already been discussed. The real power of the PSTricks package is the
ability to create graphics using LaTeX-like syntax.
PSTricks provides users with the capability to draw using the familiar syntax of LATEX.
The previous example might be easier to understand if we include more detail in the sketch. Thus
Here’s a curve. Notice that the points used can be turned on (as shown) or off.
where the values \xmin, \ymin, etc. have been defined previously as
We begin by setting the default unit(s) in PSTricks using the command \psset{unit=1cm} . This is actually the
default value.
There are built-in shapes
Here is a circle centered at (-2,-1) of radius 2.
Here is the same object filled-in and clipped.
Finally, we plot some functions. To do this we’ll use some custom macros that give the user better control over the
coordinate system.
And again, using better grid controls.
Here’s something useful for integration theory
Here is the code
Suppose that you wish to plot the following data.
| 0, | 0 |
| 0.0628, | 0.06279 |
| 0.1256, | 0.12533 |
| ... | ... |
The following code does the trick.