[pstricks] pstricks-add

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Fri Jul 9 08:01:45 CEST 2004


Alan Ristow wrote:
> On Thu, 08 Jul 2004 08:25:43 +0200, Herbert Voss
> <Herbert.Voss at alumni.TU-Berlin.DE> wrote:
> 
> 
>>\readdata{\data}{demo1.dat}
>>\pstScalePoints(1,0.000001){}{}
>>\begin{center}
>>\psframebox[linecolor=red,linestyle=dashed]{%
>>\psgraph%
>>   [axesstyle=frame, ticklines=all,ylabelFactor=$\cdot 10^6$,%
>>    Dx=5, Dy= 100](-1,25)(0,750){10cm}{8cm}         % parameters
>>   \listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
>>\endpsgraph
>>}
>>
>>\vspace{1cm}
>>\psframebox[linecolor=red,linestyle=dashed]{%
>>\begin{pspicture}(-1,-1)(0.2,8.5)% this seems to be a bug !!!!!
> 
> 
> I'm not entirely sure what bug you are referring to here, but the reason

the problem is the x value, I am not really sure if it is
a bug or a feature ...

> I figure either this is the bug you are talking about, or it is a new
> one, or I just don't understand what coordinate system the outer
> pspicture environment is working with. At any rate, it is this sort of
> behavior that led me to believe that pspicture environments should not
> be nested.

the following needs the _latest_ pstricks-add.

Herbert



\documentclass[a4paper]{article}
\usepackage{filecontents}

\begin{filecontents*}{demo.dat}
1989 3.08
1990 3.84
1991 4.08
1992 3.21
1993 5.23
1994 2.97
1995 2.53
1996 2.8
1997 2.78
1998 3.15
1999 2.32
2000 2.4
2001 2.46
\end{filecontents*}

\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\pagestyle{empty}
\parindent=0pt

\begin{document}
   \centering%
%  \psset{xunit=0.3333in,yunit=0.4444in}%
   \psframebox[linecolor=blue,linestyle=dashed]{%
     \begin{pspicture}(-0.5,-0.5)(0.2,6.1)
       \psframebox[linecolor=red,linestyle=dashed]{%
         \pstScalePoints(1,1){1989 sub}{2 sub}%
 
\begin{psgraph}[axesstyle=frame,Ox=1989,Oy=2.00,Dx=1,Dy=0.5,tickstyle=bottom]%
             (0,12)(0,4.5){4in}{2in}
           \readdata{\data}{demo.dat}%
 
\listplot[linecolor=black,showpoints=true,plotstyle=line,dotstyle=o]{\data}%
         \end{psgraph}
        }
     \end{pspicture}
   }
\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list