12.07.2015 Views

graphics with PSTric..

graphics with PSTric..

graphics with PSTric..

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Custom Graphics\begin{pspicture}(-1,-1)(1,0)\psplot{-1}{0}{x 1 add 2 exp 1 sub}\psplot{0}{1}{x 1 sub 2 exp 1 sub}\psline(1,-1)(-1,-1)\end{pspicture}Simple customizationHigher level customizationSo far, so good; but how do we color this? This is where \pscustom steps in.Look at the code and the output shown below:\begin{pspicture}(-1,-1)(1,0)\pscustom[fillstyle=solid,%fillcolor=Red,%linestyle=none]{%\psplot{-1}{0}{x 1 add 2 exp 1 sub}\psplot{0}{1}{x 1 sub 2 exp 1 sub}\psline(1,-1)(-1,-1)}\end{pspicture}Online L A TEX TutorialPart II – Graphics<strong>PSTric</strong>ksNow it’s only a question of scaling the stem we’ve created and pasting at thebottom of the circles, to make our picture:\psset{unit=1.5cm}\begin{pspicture}(-1,-1)(2,2)\bigdots(0,0)(0.8,0)(0.4,0.75)\rput(0.4,-0.3){%\pscustom[xunit=0.25cm,%yunit=0.75cm,%linestyle=none,%fillstyle=solid,%fillcolor=Red]{%\psplot{-1}{0}{x 1 add 2 exp 1 sub}\psplot{0}{1}{x 1 sub 2 exp 1 sub}\psline(1,-1)(-1,-1)}}\end{pspicture}•• •E Krishnan, CV Radhakrishnan and AJ Alexconstitute the <strong>graphics</strong> tutorial team. Commentsand suggestions may be mailed totutorialteam@tug.org.inc○2004, 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 7/23

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

Saved successfully!

Ooh no, something went wrong!