tikz-network icon indicating copy to clipboard operation
tikz-network copied to clipboard

Negative interaction sign for directed edges

Open qmarcou opened this issue 6 years ago • 1 comments

Hello! Thanks for putting this great work together! I would have one feature request in order to make your package suitable for my needs: I'm trying to draw a network where interactions are directed and can be either positive or negative which I would like to be able show graphically (showing positive interaction with a arrow head, and negative one with a dash, see here for example). Would it be possible to add this feature? Thanks!

qmarcou avatar Mar 09 '19 21:03 qmarcou

Thank you very much for your comment. In fact, it would be helpful to simply change the look of the arrows. In the next version I will try to take this into account. In the meantime you can help yourself with the style option:

\documentclass{standalone}
\usepackage{tikz-network}
\begin{document}
\begin{tikzpicture}
% Vertices
\Vertex[x=0,y=-0,label=a]{A} \Vertex[x=3,y=-0,label=b]{B}
\Vertex[x=0,y=-1,label=c]{C} \Vertex[x=3,y=-1,label=d]{D}
\Vertex[x=0,y=-2,label=e]{E} \Vertex[x=3,y=-2,label=f]{F}

% Edges
\Edge[Direct](A)(B)
\Edge[style={-{Bar}, dashed}](C)(D)
\Edge[style={-{Turned Square[length=0.2cm,width=0.2cm]}}](E)(F)
\end{tikzpicture}
\end{document}

PS: An overview of all available arrow tips can be found in the TikZ & PGF manual section 16.5.

hackl avatar Mar 11 '19 07:03 hackl