[pstricks] \psgraph

jmpapy Jean-Michel.Papy at esat.kuleuven.ac.be
Mon Jul 5 15:22:28 CEST 2004


Nice, it seems very flexible. 
I saw that you defined 
\def\psgraph at iii[#1][#2](#3,#4){%
   \edef\pst at scaleX{#3 }%
   \edef\pst at scaleY{#4 }%
   \psgraph at iv[#1][#2]%
}

but nothing about \pst at PSopX and \pst at PSopY. So for the non-linear 
scales (like log for instance) we therefore have to write

\makeatletter\def\pst at PSopY{log}\makeatother
  or
\makeatletter\def\pst at PSopX{log}\makeatother

just before plotting.  

JM

Herbert Voss wrote:
> in fact of the last thread I thought about a macro
> \psgraph, which does the scaling of the axes, the
> scaling of the data records (also log).
> 
> Here is my first try. Comments?

uuups, sorry ,the other half is missing ...

Herbert


[ ... ]

> \begin{document}

\readdata{\data}{nodes.total}
\psgraph%
    [axesstyle=frame,ticklines=all]               % options for the axes
    [linecolor=red,linewidth=2pt,showpoints=true] % options for plot
    (1,0.000001)                                  % optional scaling - 
default (1,1)
    {\data}{25}{750}{5}{100}{12cm}{10cm}          % parameters
    %data | maxX | maxY | Dx | Dy | Length x-axis | length y-axis

\vspace{0.75cm}
\psset{xAxesLabel=x-Axes,yAxesLabel=y-Axes,%
    xAxesLabelPos={6cm,-1cm},yAxesLabelPos={-1.5cm,5cm}}
\psgraph[axesstyle=frame,ticklines=all]%
    [linecolor=red,linewidth=2pt,showpoints=true]
    (1,0.000001){\data}{25}{750}{5}{100}{12cm}{10cm}

\end{document}




More information about the PSTricks mailing list