[pstricks] How to improve this code to produce the same millimeter paper.
Carlos Macedo
qtmacedo at sapo.pt
Mon Jun 23 20:31:52 CEST 2003
Hi!
I have some difficulties with the sintaxe of \psgrid command to produce a
nice-looking millimeter paper.
After some efforts I got what I wanted, but with a horrible code!
My question is: How can I improve this code in a simple way?
Many thanks,
Carlos
----------------------------------------------------------------------------
----------------------------
----------------------------------------------------------------------------
----------------------------
\documentclass[portuguese]{article}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{pstcol}
\usepackage{pst-plot}
\definecolor{orange}{cmyk}{0,0.61,0.87,0}
\pagestyle{empty}
\begin{document}
\begin{center}
\textbf{\Large Curva de equilíbrio}
\vspace{1.5cm}
\psset{xunit=10cm,yunit=10cm}
\begin{pspicture}(-.01,-.01)(1,1)
\psgrid[subgriddiv=100,gridlabels=0pt,gridwidth=.01pt,subgridcolor=orange](0
,0)(1,1)
\psline[linewidth=1pt,linecolor=orange](.1,0)(.1,1) % I do not like this
set of eighteen \psline commands,
\psline[linewidth=1pt,linecolor=orange](.2,0)(.2,1) % that I suspect to
be possible to replace by a simple one,
\psline[linewidth=1pt,linecolor=orange](.3,0)(.3,1) % maybe inside the
options of \psgrid command.
\psline[linewidth=1pt,linecolor=orange](.4,0)(.4,1)
\psline[linewidth=1pt,linecolor=orange](.5,0)(.5,1)
\psline[linewidth=1pt,linecolor=orange](.6,0)(.6,1)
\psline[linewidth=1pt,linecolor=orange](.7,0)(.7,1)
\psline[linewidth=1pt,linecolor=orange](.8,0)(.8,1)
\psline[linewidth=1pt,linecolor=orange](.9,0)(.9,1)
\psline[linewidth=1pt,linecolor=orange](0,.1)(1,.1)
\psline[linewidth=1pt,linecolor=orange](0,.2)(1,.2)
\psline[linewidth=1pt,linecolor=orange](0,.3)(1,.3)
\psline[linewidth=1pt,linecolor=orange](0,.4)(1,.4)
\psline[linewidth=1pt,linecolor=orange](0,.5)(1,.5)
\psline[linewidth=1pt,linecolor=orange](0,.6)(1,.6)
\psline[linewidth=1pt,linecolor=orange](0,.7)(1,.7)
\psline[linewidth=1pt,linecolor=orange](0,.8)(1,.8)
\psline[linewidth=1pt,linecolor=orange](0,.9)(1,.9) % The last \psline
command to be eventually replaced by
% something more optimized.
\psaxes[axesstyle=frame,Dx=.2,Dy=.2,linewidth=0.5pt,linewidth=1pt](0,0)(1,1)
\pscurve[linewidth=1.3pt]%
(1,1)(.79,.90)(.644,.818)(.492,.707)(.382,.594)(.298,.498)%
(.208,.379)(.120,.252)(.048,.127)(0,0)
\rput{90}(-.15,.5){\textbf{Fracção molar do benzeno no vapor,
$y$}}
\rput[lb]{0}(.15,-.12){\textbf{Fracção molar do benzeno no líquido,
$x$}}
\end{pspicture}
\end{center}
\end{document}
----------------------------------------------------------------------------
----------------------------
----------------------------------------------------------------------------
----------------------------
More information about the PSTricks
mailing list