12.07.2015 Views

graphics with PSTric..

graphics with PSTric..

graphics with PSTric..

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note that <strong>with</strong> sufficiently many points specified in plotpoints, we getthe same curve <strong>with</strong> plotsyle=curve and plotstyle=line, since PostScriptdraws any curve by joining short enough line segments).There’s one more value plotstye=dots, which draws only the dots usedto draw the curve, <strong>with</strong>out joining them. here, we can also use the variousdotstyle values described in the first chapter. This is shown in the nextexample:Plotting TricksFunction plottingAxes of coordinatesData plotting\begin{pspicture}(-2,-2)(2,2)\psgrid[gridcolor=Apricot,%gridlabelcolor=Mahogany,%subgridcolor=Apricot]\psplot[plotstyle=dots,%dotstyle=asterisk,%linecolor=Blue,%plotpoints=20]%{-1.5}{1.5}{x 3 exp x sub}\end{pspicture}210-1-2** *** ********** ***-2 -1 0 1 2**Online L A TEX TutorialPart II – Graphics<strong>PSTric</strong>ksOther relevant parameters can also be set for the \psplot command. Thusif we want to plot the function f (x) = sin x <strong>with</strong> x measured in radians (recallthat PostScript computes sin x for x measured in degrees), we will have toAscale down the x coordinates by˙180= 0.0174. This can be done as shownbelow:E Krishnan, CV Radhakrishnan and AJ Alexconstitute the <strong>graphics</strong> tutorial team. Commentsand suggestions may be mailed totutorialteam@tug.org.inc○2002, 2003, The Indian TEX Users GroupThis document is generated by PDFTEX <strong>with</strong>hyperref, pstricks, pdftricks and pdfscreenpackages in an intel PC running GNU/LINUXand is released under LPPLThe Indian TEX Users GroupFloor III, SJP Buildings, Cotton HillsTrivandrum 695014, INDIAhttp://www.tug.org.in£ ¡ ¢ ¤ ¥ ¦ © 6/31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!