[pstricks] small problem with psgraph
Patrice Mégret
Patrice.Megret at fpms.ac.be
Fri Oct 31 13:07:33 CET 2008
Dear Herbert,
Thanks a lot for this explanation.
Patrice
-----Message d'origine-----
De : pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] De la part de Herbert Voss
Envoyé : vendredi 31 octobre 2008 10:48
À : Graphics with PSTricks
Objet : Re: [pstricks] small problem with psgraph
Patrice Mégret schrieb:
> I have a small trouble with psgraph environment. When I use \pscircle, \pswedge, \psarc the scaling is not correct.
>
> No problem with \psellipse, \psframe, \psline.,
Patrice,
this is the default behaviour of _PSTricks_, it takes only the \psunit
into acount, but not \psxunit and \psyunit for the three makros.
Compare the following two examples. The first one will also be correct,
if you use \psset{unit=5cm}. And with \psgraph you can write simply
\let\psunit\psxunit (see example).
Herbert
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\psset{xunit=5cm,yunit=5cm}
%\psset{unit=5cm}
\begin{pspicture}{->}(-1.1,-1.1)(1.1,1.1)
\psaxes[Dx=0.2,Dy=0.2]{->}(0,0)(-1.1,-1.1)(1.1,1.1)
\psarc[linecolor=green](0,0){1}{0}{90}
\pscircle[linecolor=red]{1}
\psellipse(1,0.5)
\psline(1,1)(0,0.5)
\psframe(0.5,0.5)(1,1)
\pswedge[linecolor=blue]{1}{0}{45}
\end{pspicture}
\begin{psgraph}[Dx=0.2,Dy=0.2]{->}(0,0)(-1.1,-1.1)(1.1,1.1){10cm}{10cm}
\let\psunit\psxunit
\psarc[linecolor=green](0,0){1}{0}{90}
\pscircle[linecolor=red]{1}
\psellipse(1,0.5)
\psline(1,1)(0,0.5)
\psframe(0.5,0.5)(1,1)
\pswedge[linecolor=blue]{1}{0}{45}
\end{psgraph}
\end{document}
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
More information about the PSTricks
mailing list