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.

7.3. Data plottingThe command \psplot is used to plot a curve from its algebraic equation.As mentioned above, the coordinates of points to be plotted is computed byPostScript and a curve (depending on the plotstyle parameter) connectingthese is drawn. If instead, the coordinates of the points are to be explicitlyspecified, we use the \pscurve or \psline command. But, if the set ofcoordinates is large or is generated by some other program, then it’s tedious(and inelegant) to include all these in the TEX code. The pst-plot packagehas some plotting commands by which a list of coordinates contained in anexternal file can be piped into TEX code.For example, consider the file data1.csv <strong>with</strong> contents as shown below,exported from the gnumeric spreadsheet program:1,3.751.5,32,4.52.5,1.53,4.53.5,34,4.1254.5,35,4.55.5,2.256,4.125To plot a line graph of this data, we can use the command \fileplot asshown below:Plotting TricksFunction plottingAxes of coordinatesData plottingOnline L A TEX TutorialPart II – Graphics<strong>PSTric</strong>ksE 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£ ¡ ¢ ¤ ¥ ¦ © 25/31

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

Saved successfully!

Ooh no, something went wrong!