You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the easiest way to customize the edge labels is to change the EdgeLabelStyle. The default options can be overwritten by appending new styles (see example below).
In the next version of tikz-network I will add a dedicated command to make this easier for the users.
\documentclass{standalone}
% Used packages\usepackage{tikz-network}
% Change the default EdgeLabelStyle\tikzset{EdgeLabelStyle/.append style={ % add styles to te existing EdgeLabelStyle
rectangle, % make the bounding box rectangular
rounded corners, % round the corners of the box
fill=black!30, % add some nice background color
sloped, % align the text with the edge
inner sep=1pt % add a little space around the text
}}
\begin{document}
\begin{tikzpicture}
% Vertices\Vertex[size=.4,color=green,opacity=.9,label=a]{A}
\Vertex[x=4,y=.7,opacity=.5,label=b]{B}
% Edges\Edge[label={This is a very long text},lw=.5,color=red](A)(B)
\end{tikzpicture}
\end{document}
Greetings :)
I got the following graph:
PDF: test2.pdf
How can I achieve that the edge labels are (1) always along the edges and (2) manipulate the size of the white circle around the edge labels?
Similar to this graph: text.pdf
The text was updated successfully, but these errors were encountered: