Graphics, Figures & Tablespstricks | Rotate Circle created with '\nccircle'

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
themistos
Posts: 4
Joined: Mon Aug 08, 2011 11:46 pm

pstricks | Rotate Circle created with '\nccircle'

Post by themistos »

Dear all,

I want to rotate to the side the small circle it is created above a node with the \nccircle command. Does anyone know how to achieve this?

Many thanks,
Themis

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pstricks | Rotate Circle created with '\nccircle'

Post by localghost »

For good answers it requires a true minimal example that exactly shows what you are doing.


Thorsten
themistos
Posts: 4
Joined: Mon Aug 08, 2011 11:46 pm

pstricks | Rotate Circle created with '\nccircle'

Post by themistos »

A small example:

Code: Select all

\documentclass{article}
\usepackage{multido}
\usepackage{amsfonts}
\usepackage{pstricks,pst-plot,pst-node,pst-tree,pstricks-add}
\pagestyle{empty}
\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10}
\begin{document}
\begin{center}
\begin{pspicture}(0,0)(10,10)
\psset{arrows=->,arcangle=10,arrowsize=4pt 2,labelsep=2pt}
\cnodeput[fillstyle=solid,fillcolor=lightgray](0,2){A}{$S_1$}
\cnodeput[fillstyle=solid,fillcolor=lightgray](3,2){B}{$S_2$}
\psset{nodesep=3pt}
\ncarc{->}{A}{B}
\ncarc{->}{B}{A}
\nccircle[arrowsize=4pt 2]{->}{A}{4.5mm}
\nccircle[arrowsize=4pt 2]{<-}{B}{4.5mm}
\end{pspicture}
\end{center}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pstricks | Rotate Circle created with '\nccircle'

Post by localghost »

You can specify an angle for such loops at nodes.

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}

\begin{document}
  \begin{pspicture}[showgrid=true](-3,-1)(3,1)
    \psset{arrows=->,arcangle=10,arrowsize=4pt 2,labelsep=2pt,nodesep=3pt}
    \cnodeput[fillstyle=solid,fillcolor=lightgray](-2,0){A}{$S_1$}
    \cnodeput[fillstyle=solid,fillcolor=lightgray](2,0){B}{$S_2$}
    \ncarc{->}{A}{B}
    \ncarc{->}{B}{A}
    \nccircle[arrowsize=4pt 2,angle=90]{->}{A}{4.5mm}
    \nccircle[arrowsize=4pt 2,angle=-90]{<-}{B}{4.5mm}
  \end{pspicture}
\end{document}
themistos
Posts: 4
Joined: Mon Aug 08, 2011 11:46 pm

Re: pstricks | Rotate Circle created with '\nccircle'

Post by themistos »

Thanks a lot! That was all I needed for the moment! :)
Post Reply