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 wish to add dotted line connecting two nodes and an arc line as described in the photo. enter image description here

Here is my code:

\documentclass[tikz]{standalone}
\usetikzlibrary{
    shapes.geometric,
    positioning,
    fit,
    calc
}
\usepackage{tikz}
\begin{document}

\tikzset{
 block/.style = {circle, draw,
    text width=1em,align=center,inner sep=0pt},
  line/.style = {draw,thick,->},
}
\begin{tikzpicture}
\node [block] (s1) {1};
\node [block, below = of s1](s2){2};
\path [line] (s1) -- node [right] {b} (s2);
\end{tikzpicture}
\end{document} 
share|improve this question

1 Answer 1

up vote 5 down vote accepted

How about

screenshot

I've used the calc library to shift the a path to the left a bit.

\documentclass[tikz]{standalone}
\usetikzlibrary{
    positioning,
    calc
}
\usepackage{tikz}
\begin{document}

\tikzset{
 block/.style = {circle, draw,
    text width=1em,align=center,inner sep=0pt},
  line/.style = {draw,thick,->},
}
\begin{tikzpicture}
\node [block] (s1) {1};
\node [block, below = of s1](s2){2};
\path [line] (s1) -- node [right] {b} (s2);
\draw[dashed,->]  (s1.west) to[bend right=30] (s2);
\draw[->]  ($(s1.west)+(-1,0)$) to[bend right=30] node[left,block]{a}($(s2)+(-1,0)$);
\end{tikzpicture}
\end{document} 
share|improve this answer

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.