[pstricks] Problem setting up the correct labels
Niklas Nawrath
efrat10 at gmx.de
Sat Feb 9 14:16:52 CET 2013
Hi Frank,
It seems to be a Problem with the number of decimal digits.
With 1.0, it works for me:
\documentclass{scrartcl}
\usepackage{pst-all}
\usepackage{pstricks-add}
\begin{document}
\begin{figure}
\begin{center}
\psgraph[Ox=-3.5,Oy=-3.5,Dx=1.0,Dy=1.0]{-}(-3.5,-3.5)(-3.5,-3.5)(0.5,0.5){5cm}{5cm}
\psdots[dotstyle=o, dotsize=6pt](-3.5,-3.5)(0.5,0.5)
\psdots[dotstyle=*, dotsize=6pt](0,0)
\endpsgraph
\end{center}
\end{figure}
\end{document}
Hope it works for you too.
Kind Regards,
Niklas
> Hi,
>
>
> I have a simple problem.
> I want a graph starting at -3.5, ending at 0.5 (from left to right) on
> both axes and the labels in steps of 1, as -3.5, -2.5, -1.5, -0.5 and
> 0.5.
> Changing the spread from 1 to 0.5 gets me into trouble as I do not
> want to increase the size of the picture.
>
> This causes trouble however as the labels I get are: -3.5, -2, -1, 0, 1.
> The data, however is shown in respect to the labels as I want them.
>
> Is it, that the 0 as a label has to appear?
>
> Example:
> \documentclass{scrartcl}
>
> \usepackage{pst-all}
> \usepackage{pstricks-add}
>
> \begin{document}
> \begin{figure}
> \begin{center}
> \psgraph[Ox=-3.5,Oy=-3.5,Dx=1,Dy=1]{-}(-3.5,-3.5)(-3.5,-3.5)(0.5,0.5){5cm}{5cm}
> \psdots[dotstyle=o, dotsize=6pt](-3.5,-3.5)(0.5,0.5)
> \psdots[dotstyle=*, dotsize=6pt](0,0)
> \endpsgraph
> \end{center}
> \end{figure}
> \end{document}
>
> For me the points (-3.5,-3.5) and (0.5,0.5) appear at the labels -3.5
> and 1, respectively.
> The point (0,0) appears at (0.5,0.5).
>
> So the data is at the correct position, but the labels are wrong.
>
>
> Inverting the axes, in going from 0.5 to -3.5, does not help.
> In fact I get the labels 0.5, -0.3, -2, -3, -4.
>
> \documentclass{scrartcl}
>
> \usepackage{pst-all}
> \usepackage{pstricks-add}
>
> \begin{document}
> \begin{figure}
> \begin{center}
> \psgraph[Ox=0.5,Oy=0.5,Dx=-1,Dy=-1]{-}(0.5,0.5)(-3.5,-3.5){5cm}{5cm}
> \psdots[dotstyle=o, dotsize=6pt](-3.5,-3.5)(0.5,0.5)
> \psdots[dotstyle=*, dotsize=6pt](0,0)
> \endpsgraph
> \end{center}
> \end{figure}
> \end{document}
>
> The points appear at the correct position.
>
> Kind regards Frank
>
>
More information about the PSTricks
mailing list