Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have not found a document explaining my problem below. In my understanding, if \pnode(1,1){A} then \pscircle[origin={A}](A){1} must be identical to

  • \pscircle[origin={1,1}](A){1}
  • \pscircle[origin={A}](1,1){1}
  • \pscircle[origin={1,1}](1,1){1}

However, I got the following result that is different from my mental model above. How does PSTricks make assumption when handling nodes and literal points?

enter image description here

\documentclass[border=12pt]{standalone}
\usepackage{pst-node}
\psset{linecolor=red}

\def\xxx{\hspace{5mm}}

\begin{document}

\begin{pspicture}[showgrid=top](3,3)
\pnode(1,1){A}
\pscircle[origin={A}](A){1}
\end{pspicture}\xxx

\begin{pspicture}[showgrid=top](3,3)
\pnode(1,1){A}
\pscircle[origin={1,1}](A){1}
\end{pspicture}\xxx

\begin{pspicture}[showgrid=top](3,3)
\pnode(1,1){A}
\pscircle[origin={A}](1,1){1}
\end{pspicture}\xxx

\begin{pspicture}[showgrid=top](3,3)
\pscircle[origin={1,1}](1,1){1}
\end{pspicture}

\end{document}
share|improve this question
    
Would the explanation on page 23 of the pstricks manual be a credible source for the answer? –  percusse Jul 30 '12 at 22:04
    
@percusse: No information on page 23 about the relationship between nodes, origin and literal points. –  Oh my ghost Jul 31 '12 at 3:44
    
Document page number 23, literal page number 30. –  percusse Jul 31 '12 at 10:10
    
@percusse: please quote them in your answer. I have not found the relevant statements on the given page number. –  Oh my ghost Jul 31 '12 at 10:37
    
@StiffJokes Why a new bounty? –  Paul Gaborit Jan 2 at 7:49

1 Answer 1

up vote 5 down vote accepted
+150

origin={x,y} is the equivalent of shift={(x,y)} supplied to a scope in TikZ or a local shift to the coordinate system:

\begin{tikzpicture}
\node (o) {O};
\begin{scope}[shift={(2,2)}]
\node (a) at (o) {A};
\end{scope}
\end{tikzpicture}

In this one it doesn't matter if the coordinate system is shifted or not. The command says put this at node named (o). So no shift is applied. Same happens with the origin={A}. The code says shift the coordinate system but then the same code says put it where A is so the net effect is moving the center of the circle to {A}.

\documentclass[border=12pt]{standalone}
\usepackage{pst-node}
\psset{linecolor=red}


\begin{document}

\begin{pspicture}[showgrid=top](5,3)
\pnode(2,1){A}
\pscircle[origin={1,1}](A){1} %<---- A is a fixed point, no effect via origin 
\psdiamond[framearc=.3,fillstyle=solid,      %<---- No fixed point, coords of A are 
fillcolor=lightgray,origin={A}](3,0)(1.5,1)  % added to the coordinate system
\pscircle[origin={1,1}](0,0){1}              % Same here
\end{pspicture}

\end{document}

enter image description here

share|improve this answer
    
I want to offer a bounty for my another question. But this one must be finalized first. Actually I don't understand well your answer. –  Oh my ghost Aug 1 '12 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.