1

I have created a directed graph and want to add a thick, shaded arrow to indicate change over time. The problem: It should go from one edge to another (from initial state to result state), not from one node to another like the other arrows. Is there any way to do this? I found the code for an arrow which is close enough to "thick and shaded", but I don't seem to be able to put it in the right place.

        \documentclass[12pt,a4paper]{article}

        \usepackage{tikz}
        \usetikzlibrary{arrows,automata,positioning}

        \newcommand{\feat}[1]{\textsc{#1}}
        \newcommand{\type}[1]{\textit{#1}}
        \newcommand{\fsbase}[1]{{\scriptsize #1}}

        \begin{document}

        \begin{tikzpicture}
    [
     semithick, x=2.4cm,y=0.9cm, >=latex, baseline=7ex,
    % anchor=base,
     inner sep=.2ex, outer sep=.6ex, minimum size=3.0ex
    ]
    {\node (pc) at ( 1.5, 2.0) [circle,double,draw,minimum size=4ex,thick,label=90:$\type{bumfuzzlement}$] {\fsbase{}};}
    {\node (in) at ( 0.0, 0.0) [circle,draw,label={[label distance=-1ex]175:$\type{interaction}$}] {\fsbase{}};}
    {\node (en1) at ( -0.5,-3.0) [circle,draw,label=left:$\type{entity}$] {\fsbase{}};}
    {\node (en2) at ( 0.5,-3.0) [circle,draw,label=right:$\type{entity}$] {\fsbase{}};}
    {\node (an) at ( 0.5,-5.0) [circle,draw,label=below:$\type{animate}$] {\fsbase{}};}
    {\node (ch) at ( 3.0,-0.0) [circle,draw,label={[label distance=-1ex]20:$\type{change of psych state}$}] {\fsbase{}};}
    {\node (ps1) at ( 2.5,-3.0) [circle,draw,label=left:$\type{psych state}$] {};}
    {\node (ps2) at ( 3.5,-3.0) [circle,draw,label=right:$\type{psych state}$] {};}


    {\path[->](pc) edge[bend right=15] node[above left]{\feat{cause}} (in);}
    {\path[->](pc) edge[bend left=15] node[above right]{\feat{effect}} (ch);}
    {\path[->](in) edge[bend right=15] node[left]{\feat{stimulus}} (en1);}
    {\path[->](in) edge[bend left=15] node[right]{\feat{experiencer}} (en2);}
     {\path[->](en2) edge[bend left=0] node[right]{\feat{animacy}} (an);}
    {\path[->](ch) edge[bend right=15]
     node[left]{\feat{initial state}} (ps1);}
    {\path[->](ch) edge[bend left=15] node[right]{\feat{result state}} (ps2);}
     {\path[->](en2) edge[bend left=13] node[above]{\feat{experience}} (ch);}
    {\path[->](pc) edge[bend right=75,dashed] node[above]{\feat{}} (en1);}
    {\path[->](pc) edge[bend left=75,dashed] node[above]{\feat{}} (ps2);}
    {\path[-](ps1) edge[bend left=0] node[below]{\feat{$\neq$}} (ps2);}

    \end{tikzpicture}

\tikz\draw[line width=1mm,-implies,double, double distance=1mm] (0,0) -- (1,0);


        \end{document}
  • Use the names of your nodes, as in: \draw[line width=1mm,-implies,double, double distance=1mm] (pc) to[out=-90,looseness=2] (en2); \draw[line width=1mm,-implies,double, double distance=1mm] (en1) -- (en2); (this can go directly inside the tikzpicture environment after creating the nodes.) – Gonzalo Medina Jun 20 '14 at 18:34
  • The problem is not very clear...where does the arrow have to start and end? Why can't you just create it as the other arrows of the graph (but with the extra options for the arrow style)? Do you need to create it from outside the tikzpicture environment? (in that case see the remember picture option) – Bordaigorl Jun 20 '14 at 21:28
  • The problem is that it should go from one edge to another. The arrows I've created so far all go from one node to another. This doesn't have to be reflected in the code - I would also be happy if someone told me how to place the arrow on a specific point in the picture (like you do with the nodes), without "attaching" it to anything. – LeaRebecca Jun 23 '14 at 7:24
1

It is possible to name the nodes when they are added to the edge, so that you can use them later. In your example, you simply have to add a name to the following nodes

{\path[->](ch) edge[bend right=15] node[left](initial state){\feat{initial state}} (ps1);}
{\path[->](ch) edge[bend left=15] node[right](result state){\feat{result state}} (ps2);}

(Note that I added a name to each node between the option field [] and the label field {}) You can then use these names to draw the arrow :

\draw[line width=1mm,-implies,double, double distance=1mm] (initial state) -- (result state);

This gives the complete code below:

\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,positioning}

\newcommand{\feat}[1]{\textsc{#1}}
\newcommand{\type}[1]{\textit{#1}}
\newcommand{\fsbase}[1]{{\scriptsize #1}}

\begin{document}

\begin{tikzpicture}
[
 semithick, x=2.4cm,y=0.9cm, >=latex, baseline=7ex,
% anchor=base,
 inner sep=.2ex, outer sep=.6ex, minimum size=3.0ex
]
    {\node (pc) at ( 1.5, 2.0) [circle,double,draw,minimum size=4ex,thick,label=90:$\type{bumfuzzlement}$] {\fsbase{}};}
    {\node (in) at ( 0.0, 0.0) [circle,draw,label={[label distance=-1ex]175:$\type{interaction}$}] {\fsbase{}};}
    {\node (en1) at ( -0.5,-3.0) [circle,draw,label=left:$\type{entity}$] {\fsbase{}};}
    {\node (en2) at ( 0.5,-3.0) [circle,draw,label=right:$\type{entity}$] {\fsbase{}};}
    {\node (an) at ( 0.5,-5.0) [circle,draw,label=below:$\type{animate}$] {\fsbase{}};}
    {\node (ch) at ( 3.0,-0.0) [circle,draw,label={[label distance=-1ex]20:$\type{change of psych state}$}] {\fsbase{}};}
    {\node (ps1) at ( 2.5,-3.0) [circle,draw,label=left:$\type{psych state}$] {};}
    {\node (ps2) at ( 3.5,-3.0) [circle,draw,label=right:$\type{psych state}$] {};}


    {\path[->](pc) edge[bend right=15] node[above left]{\feat{cause}} (in);}
    {\path[->](pc) edge[bend left=15] node[above right]{\feat{effect}} (ch);}
    {\path[->](in) edge[bend right=15] node[left]{\feat{stimulus}} (en1);}
    {\path[->](in) edge[bend left=15] node[right]{\feat{experiencer}} (en2);}
    {\path[->](en2) edge[bend left=0] node[right]{\feat{animacy}} (an);}
    {\path[->](ch) edge[bend right=15] node[left](initial state){\feat{initial state}} (ps1);}
    {\path[->](ch) edge[bend left=15] node[right](result state){\feat{result state}} (ps2);}
    {\path[->](en2) edge[bend left=13] node[above]{\feat{experience}} (ch);}
    {\path[->](pc) edge[bend right=75,dashed] node[above]{\feat{}} (en1);}
    {\path[->](pc) edge[bend left=75,dashed] node[above]{\feat{}} (ps2);}
    {\path[-](ps1) edge[bend left=0] node[below]{\feat{$\neq$}} (ps2);}

    \draw[line width=1mm,-implies,double, double distance=1mm] (initial state) -- (result state);
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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