Alexis Wilhelm | 13 Mar 10:41
Picon

Fwd: how to access the node at the end of the pin?

OMG I'm such a noob.  I just realized I forgot to Cc the list.

---------- Forwarded message ----------
From: Alexis Wilhelm <alexiswilhelm <at> gmail.com>
Date: 2010/3/12
Subject: Re: [Pgf-users] how to access the node at the end of the pin?
To: Stefan Pinnow <Mo-Gul <at> gmx.net>

Hi,

I was able to do it using /tikz/after node path.  But it's dirty.

\documentclass{minimal}
\usepackage[paperheight=160cm, paperwidth=15cm, margin=2cm]{geometry}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
       test/.style 2 args={
               circle,
               draw,
               minimum size=#1,
               name=ThisNode,
               after node path={
                       (\tikzlastnode)
                       ++ (#2 : #1 / 2 + .5cm)
                       node [
                               draw,
                               anchor=west,
                               rotate=#2
                       ] {bla}
                       edge (ThisNode)
               },
       },
]

\foreach \i in {0, ..., 24} {
       \node[test={1cm}{\i * 15}] at (0, \i * -6cm) {};
       \node[test={5cm}{\i * 15}] at (0, \i * -6cm) {\i};
}

\end{tikzpicture}
\end{document}

Hope it can help.

2010/3/5 Stefan Pinnow <Mo-Gul <at> gmx.net>:
> Hello,
> is there a way to access the node at the end of a pin?
> As you can see from the attached example the "test2" pin nodes look a bit odd.
>
> I would like to use the "test1" style and then just rotate the text inside of
> this node.
>
>
> Best regards,
> Stefan Pinnow
>
> % ------- minimal -------
> \documentclass{article}
>    \usepackage{tikz}
> \begin{document}
>    \begin{tikzpicture}[
>        pin distance=5ex,
>        every node/.style={
>            circle,
>            draw,
>        },
>        test1/.style={
>            minimum size=#1,
>            pin={[
>            ]above right:blabla}
>        },
>        test2/.style={
>            minimum size=#1,
>            pin={[
>                red,
>                rotate=45,
>            ]right:blabla}
>        },
>    ]
>
>        \node[test1=1cm]  at (0,0) {};
>        \node[test1=5cm]  at (0,0) {};
>
>        \node[test2=1cm]  at (6,0) {};
>        \node[test2=5cm]  at (6,0) {};
>    \end{tikzpicture}
> \end{document}
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>
>
Attachment (test.tex): application/x-tex, 553 bytes
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

Gmane