1

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?

2 Answers 2

3

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.

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

alt text

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .