Tuesday, November 29, 2011

Some basic graph objects in pstricks (1) ---- Dots

In this and the next few posts some basic graph objects will be introduced. And the first one to be talked is "dots".

Commands "\psdot[parameters](x1,y1)" and "\psdots[parameters](x1,y1)(x2,y2)...(xn,yn)" both draw dots on the canvas. The only difference is that the first one draw only one dot each time, while the second one can draw more than one.

What the dots looks like is depend on the parameters used. The most used parameters are "dotstyle","dotsize","linecolor","fillcolor". Dotstyle determine the style of the dots, for example "*" for a solid circle, "o" for a hollow circle, "x" for a x symbol,"square" for a square and so on. For a complete set of dotstyles you may refer to the official documents. The dotsize determine the size of the dots. The color of the dots is determined by linecolor. If the dots is with a hollow center, the center is colored with fillcolor except for dotstyle "diamond". There are also some other parameters, you can find them in the official document. And at last an example is shown below:


The picture these code draw looks like this:
Fig.1 Draw dots using Pstricks

Files Download: tex ps pdf

1 comment:

Creative Commons License
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.