[Fwd: Re: [pstricks] Questions using fileplot and psaxes]

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Tue Apr 15 16:13:07 CEST 2003



-------- Ursprüngliche Nachricht --------
Betreff: Re: [pstricks] Questions using fileplot and psaxes
Datum: Tue, 15 Apr 2003 16:06:30 +0200
Von: Herbert Voss <Herbert.Voss at alumni.TU-Berlin.DE>
An: Martin_Buchmann at gmx.net
Referenzen: <3E9BFF85.D1D6DC66 at gmx.net>

Martin Buchmann schrieb:


 > - Is there a possibility to get the labels in millimetres instead of
 > microns, i.e. divide the numbers by thousand without changing the input
 > data? I think that is what 'dx' and 'Dx' where made for but i can not
 > figure out i have to use it at the moment :-(

I changed the read x values in a way that x-> x/1000. I think this
is the better way to have the old datafile but other coordinates
in the diagramm.

Herbert

\documentclass{article}
\usepackage{pst-plot}
\makeatletter
\def\dataplot at ii#1{%
    \@nameuse{beginplot@\psplotstyle}%
      \addto at pscode{%
%% changed
        /Dx { 1000 div \pst at number\psxunit mul /D { Dy } def } def
%% end changed
        /Dy { \pst at number\psyunit mul Do /D { Dx } def } def
        /D { /D { Dx } def } def
        /Do {
          \@nameuse{beginqp@\psplotstyle}%
          /Do { \@nameuse{doqp@\psplotstyle}} def
        } def}%
      #1%
      \addto at pscode{D}%
    \@nameuse{endqp@\psplotstyle}}
\makeatother

\psset{xunit=5,yunit=1}
\begin{document}
     \begin{pspicture}(1,-0.25)(2.5,2.5)
         \fileplot[plotstyle=dots,linecolor=red]{exp.dat}
         \psaxes[Dx=0.25,Ox=1]{->}(1,0)(2,2)
         \psaxes[Dx=0.05,Ox=1,labels=none,ticksize=0.05](1,0)(2,0)
     \end{pspicture}
\end{document}



More information about the PSTricks mailing list