# Why does \rput(4,3){\psscalebox{1.5}{A}} differ from \psscalebox{1.5}{\rput(4,3){A}}?

I just tried this code to check whether both cases result in the same output. Apparently they are not identical. Why?

\documentclass[dvipsnames,cmyk]{minimal}
\usepackage[a4paper,margin=6cm]{geometry}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{graphicx}

\newpsstyle{gridstyle}{%
gridwidth=0.4pt,%default: 0.8pt
gridcolor=Red!20,%default: black
griddots=0,%default: 0
%
gridlabels=5pt,%default: 10pt
gridlabelcolor=Blue,%default: black
%
subgriddiv=5,%default: 5
subgridwidth=0.2pt,%default: 0.4pt
subgridcolor=Green!20,%default: gray
subgriddots=0%default: 0
}
\psset{style=gridstyle}

\begin{document}
\pspicture(7,7)
\psgrid
\rput(2,2){\scalebox{2}{\pscircle{1}}}
\endpspicture

\vspace{1cm}

\pspicture(7,7)
\psgrid
\scalebox{2}{\rput(2,2){\pscircle{1}}}
\endpspicture
\end{document}


Could you elaborate how \psscalebox and \rput do their jobs internally?

-

Why should this be the same?

• first scaling effects everything, also the coordinates

• first setting, then scaling doesn't effect the coordinates

However, use \psscalebox when using pstricks.

-
\scalebox{} does the same behavior as \psscalebox when they are used in PSTricks. I just tried. – xport Jan 11 '11 at 15:32
@xport: parameter setting for x y scaling is different. And it makes more sense to use the macros from PSTricks here – Herbert Jan 11 '11 at 15:43
I understood now. I forgot that the composition of translation and scaling is not commutative. :-) – xport Jan 11 '11 at 15:50

-