Skip to content

Drawing edge labels without overlap #81

Description

@EricG-Personal

This may fundamentally be a graphviz issue, but thought I would ask here in case some aspect of this can be handled by this project or there is some special value I can use with lblstyle or other property that may resolve the problem.

I have the following dot graph:

digraph G {
    splines=ortho
    rankdir=LR;
    edge [lblstyle="above, sloped"];
    A -> B [label="a long label"];
    A -> C [label="a long label"];
    A -> A [label="a very long label"];
    A -> A [label="a very long label"];
    A -> D [label="a long label"];
}

What I would like, with respect to the edge labels is:

  1. edge labels do not overlap with each other
  2. edge labels do not overlap edges
  3. edge labels are drawn along the edge or inline with them

I generate my tex document by doing:

dot -Txdot test.dot | dot2tex --tikzedgelabel > test.tex

and this generate the following graph

Screen Shot 2020-03-04 at 1 40 40 PM

I have tried other spline styles, but none produce good results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions