[pstricks] pspicture(x1,x2)(y1,y2)

Christoph Bersch usenet at bersch.net
Mon May 26 16:32:39 CEST 2008


Paolo Covelli schrieb:
> 
> I'm problems tu use coordinates (x1,x2)(y1,y2) in environment:
>  
> \begin{pspicture}(x1,x2)(y1,y2)
>   "PSTricks code"
> \end{pspicture}
>  
> which are their purpose ?
>  
> For example: (-7,-4)(7,4) what is?

try it :-)

\documentclass{article}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}(-7,-4)(7,4)
\psgrid
\end{pspicture}
\end{document}

or look at the documentation 
http://www.dante.de/CTAN/graphics/pstricks/base/doc/pstricks-doc.pdf:

\begin{pspicture}(x0 ,y0 )(x1, y1)
    picture objects
\end{pspicture}

The picture objects are put in a box whose lower left-hand corner is at
(x0 , y0 ) (by default, (0,0)) and whose upper right-hand corner is at 
(x1, y1).

> If I wish a centered image, how do I it?

Then it is best to give the pspicture the size of the contained objects 
and put it in an appropriate box (for example 'center' environment):

\documentclass{article}
\usepackage{pstricks}
\begin{document}
\begin{center}
    \fbox{\begin{pspicture}(5,5)
       \psset{linecolor=red,linewidth=0.2}
       \psline(0,0)(2,2)
       \psline(2,1)(5,5)
    \end{pspicture}}
\end{center}
\end{document}

(the \fbox is only to visualize the size of the pspicture-environment)

Christoph



More information about the PSTricks mailing list