1

Can anyone please tell me how to change the direction of the highlighted arrow in the diagram? I spent a long time trying to do this not sure how to :(

Thank you so much!

current output

\documentclass[]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\usepackage{graphicx}
\usetikzlibrary{arrows}
\usepgfplotslibrary{fillbetween}
\usepgfplotslibrary{statistics}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.multipart,shapes.geometric,calc,angles,positioning,intersections,quotes,decorations,babel,patterns,fit}
\usetikzlibrary{decorations.markings}
\newenvironment{tightcenter}{
\setlength\topsep{0pt}
\setlength\parskip{0pt}
\begin{center}}{\end{center}}
\begin{document}
\begin{tikzpicture}[
Circ/.style={circle, fill, minimum width=12pt},
InLineArrow/.style={
draw,thick, postaction={decorate,decoration={markings,mark=at position #1 with {\fill(0:5pt) -- (120:5pt) -- (240:5pt);}}}}
]
%Drawing the nodes
%\node[tikzstyle, label=angle_orientation:Text](Node_coordinate_Identifier) at (position_in_polar_coordinates){Text_none};
\node[Circ, label=150:$H$](H) at (150:2.5){};
\node[Circ, label=30:$O$](O) at (30:2.5){};
\node[Circ, label=270:$R$](R) at (270:2.5){};
%
\draw[InLineArrow=0.41] (H) arc (150-180:150-180-360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{20\sf\%};
\draw[InLineArrow=0.58] (O) arc (30-180:30-180-360:0.8) node [pos=0.58, anchor=0-180,inner sep=7pt]{80\sf\%};
\draw[InLineArrow=0.75] (R) arc (270-180:270-180-360:0.8)node [pos=0.65, anchor=180-180,inner sep=7pt]{20\sf\%};
%
%Drawing the arrows
\draw[InLineArrow=0.5] (H) to [bend left=30] node[anchor=-90, inner sep=8pt]{40\sf\%} (O);
\draw[InLineArrow=0.5] (O) to [bend left=20] node[anchor=-90, inner sep=6pt]{10\sf\%} (H);
%
\draw[InLineArrow=0.5] (H) to [bend left=20] node[anchor=50, inner sep=4pt]{40\sf\%} (R);
\draw[InLineArrow=0.5] (R) to [bend left=30] node[anchor=30, inner sep=4pt]{30\sf\%} (H);
\draw[InLineArrow=0.5] (O) to [bend left=20] node[anchor=180, inner sep=6pt]{10\sf\%} (R);
\draw[InLineArrow=0.5] (R) to [bend left=20] node[anchor=-60, inner sep=8pt]{50\sf\%} (O);
%
\end{tikzpicture}
\\\\\\\\
\begin{tikzpicture}[
Circ/.style={circle, fill, minimum width=9pt},
InLineArrow/.style={
    draw,thick, postaction={decorate,decoration={markings,mark=at position #1 with {\fill(0:5pt) -- (120:5pt) -- (240:5pt);}}}}
]
%Drawing the nodes
%\node[tikzstyle, label=angle_orientation:Text](Node_coordinate_Identifier) at (position_in_polar_coordinates){Text_none};
\node[Circ, label=-90:$A$](A) at (0,0){};
\node[Circ, label= +0:$B$](B) at (7,0){};
\node[Circ, label=+90:$C$](C) at (7,6){};
\node[Circ, label=+110:$D$](D) at (0,6){};
%
\draw[InLineArrow=0.41] (D) arc (150-180:150-180-360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{0.1};
%\draw[InLineArrow=0.41] (B) arc (150-180:150-180-360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{0.6};
%\draw[InLineArrow=0.75] (B) arc (270-180:270-180-360:0.8) node [pos=0.65, anchor=180-180,inner sep=7pt]{0.6};
\draw[InLineArrow=0.75] (B) arc (360-180-30:360-180-30-360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{};
\node[below] at (7.65,-1.3) {$0.6$};
%%
\draw[InLineArrow=0.5] (A) to [bend left=30] node[anchor=+360, inner sep=+7pt]{0.3} (D);
\draw[InLineArrow=0.5] (D) to [bend left=30] node[anchor=+180, inner sep=+7pt]{0.9} (A);
%%
\draw[InLineArrow=0.5] (A) to  node[anchor=+90, inner sep=+7pt]{0.7} (B);
%
\draw[InLineArrow=0.5] (B) to [bend left=30] node[anchor=+360, inner sep=+7pt]{0.4} (C);
\draw[InLineArrow=0.5] (C) to [bend left=30] node[anchor=+360, inner sep=+7pt]{0.2} (B);
%
\draw[InLineArrow=0.5] (C) to  node[anchor=+90, inner sep=+7pt]{0.8} (D);
\end{tikzpicture}
\end{document}
3

Change

\draw[InLineArrow=0.75] (B) arc (360-180-30:360-180-30-360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{};

to

\draw[InLineArrow=0.25] (B) arc (360-180-30:360-180-30+360:0.8) node [pos=0.41, anchor=180-180,inner sep=7pt]{};

The same, along with the label 0.6 can be achieved by simply writing

\draw[InLineArrow=0.25] (B) arc (150:150+360:0.8)node[pos=0.25,below]{0.6};

You can avoid these long statements, see the MWE:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\tikzset{
Circ/.style={circle, fill, minimum width=9pt},
InLineArrow/.style={
    draw,thick, postaction={decorate,decoration={markings,mark=at position #1 with {\fill(0:5pt) -- (120:5pt) -- (240:5pt);}}}}}
\begin{document}
\begin{tikzpicture}
%Drawing the nodes
\node[Circ, label=-90:$A$](A) at (0,0){};
\node[Circ, label= +0:$B$](B) at (7,0){};
\node[Circ, label=+90:$C$](C) at (7,6){};
\node[Circ, label=+110:$D$](D) at (0,6){};
%
\draw[InLineArrow=0.41] (D) arc (-30:-30-360:0.8) node[pos=0.41,left=+7pt]{0.1};
\draw[InLineArrow=0.25] (B) arc (150:150+360:0.8) node[pos=0.25,below=7pt]{0.6};
%%
\draw[InLineArrow=0.5] (A) to [bend left=30] node[left=7pt]{0.3} (D);
\draw[InLineArrow=0.5] (D) to [bend left=30] node[right=7pt]{0.9} (A);
%%
\draw[InLineArrow=0.5] (A) to  node[below=+7pt]{0.7} (B);
%
\draw[InLineArrow=0.5] (B) to [bend left=30] node[left=+7pt]{0.4} (C);
\draw[InLineArrow=0.5] (C) to [bend left=30] node[left=+7pt]{0.2} (B);
%
\draw[InLineArrow=0.5] (C) to  node[below=+7pt]{0.8} (D);
\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | |
  • Thank you so much! It worked beautifully. – Will Kim Aug 15 '19 at 13:01

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.