<div dir="ltr"><div>Thank you for the reply. It was helpful.</div><div dir="ltr"><br></div><div dir="ltr">I am surprised that I cannot find any graph generating solution that will take edge labels into account while positioning. <div><br></div><div>Are there any plans to add such a feature to this project?</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 5:46 PM Henri Menke <<a href="mailto:henrimenke@gmail.com">henrimenke@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">You can draw a similar graph in TikZ as well, but there edge labels also do<br>
not take part in the positioning algorithm, so overlaps have to be avoided<br>
manually.<br>
<br>
\documentclass{article}<br>
\usepackage{tikz}<br>
\usetikzlibrary{graphs,graphdrawing,quotes}<br>
\usegdlibrary{layered}<br>
\begin{document}<br>
\begin{tikzpicture}<br>
    \graph[layered layout, sibling distance=3cm, level distance=3cm] {<br>
        A ->[loop,"a very long label"] A,<br>
        A ->[loop,min distance=4cm,"a very long label"] A,<br>
        A ->["a long label" sloped] B,<br>
        A ->["a long label" sloped] C,<br>
        A ->["a long label" sloped] D,<br>
    };<br>
\end{tikzpicture}<br>
\end{document}<br>
<br>
I don't know much about graphdrawing (I'm only the maintainer, not the<br>
implementer) but I think there are no algorithm that take the labels into<br>
accout.<br>
<br>
Cheers, Henri<br>
<br>
On 3/5/20 10:05 AM, Eric Gorr wrote:<br>
> I would like to create a directed graph with edge labels with the following<br>
> properties:<br>
> <br>
>    1. edge labels do not overlap with each other<br>
>    2. edge labels do not overlap edges<br>
>    3. edge labels are drawn along the edge.<br>
> <br>
> For example, I can use the following graphviz graph<br>
> <br>
> digraph G {    splines=line;    rankdir=LR;    A -> B [label="a long<br>
> label"];    A -> C [label="a long label"];    A -> A [label="a very<br>
> long label"];    A -> A [label="a very long label"];    A -> D<br>
> [label="a long label"];}<br>
> <br>
> to generate <a href="https://i.stack.imgur.com/34uVM.png" rel="noreferrer" target="_blank">https://i.stack.imgur.com/34uVM.png</a><br>
> <br>
> However, it does not seem possible to obtain a graph with edge labels with<br>
> the three properties.<br>
> <br>
> Is creating a graph like this using PGF TIKZ possible? If so, any examples<br>
> for how to do so would be helpful.<br>
> <br>
> Thank you.<br>
> <br>
</blockquote></div>