[pstricks] psgraph for non-integral axis lengths
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Wed Sep 8 22:18:28 CEST 2004
Alan Ristow wrote:
>
> The psgraph macro has worked very well for me when the lengths of my
> axes are whole numbers. For small axes, however, it has had problems.
> Below I have a minimal example that illustrates the problems for a
> y-axis of length 0.4. If I am not mistaken, this is expected behavior
> resulting from the use of a non-integral divisor in \pst at divide (or,
> more accurately, the limited fixed-point arithmetic capabilities of
> TeX).
the division is a mess in TeX ...
but it is no problem to use integer values here ...
Herbert
\documentclass{article}
\usepackage{pstricks}%
\usepackage{pstricks-add}%
\usepackage{filecontents}%
\begin{filecontents*}{test.d}
0.0 0.2
1.0 0.35
2.0 0.38
3.0 0.22
4.0 0.15
5.0 0.21
\end{filecontents*}
\pagestyle{empty}
\begin{document}
\begin{psgraph}[axesstyle=frame,tickstyle=bottom,Dy=0.1,dy=0.5in,%
xyLabel={\small}](0,0)(5,4){4in}{2in}%
\readdata{\data}{test.d}%
\pstScalePoints(1,10){}{}%
\listplot{\data}%
\psgrid[yunit=0.5in,gridlabels=0,gridcolor=gray,subgriddiv=0](5,4)%
\end{psgraph}
\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