sfdp label_scheme example?

Is there a simple code snippet/graph available for demonstrating the sfdp label_scheme implementation:

I have tried to interpret |edgelabel|* with no success.

"...The value indicates whether to treat a node whose name has the form |edgelabel|* ..."

say a graph is in the format (duplication is intended):

graph G {
graph [label_scheme=1];
"A_1" -- "B_1" [label="test01"]
"B_1" -- "C_1" [label="test02"]
"B_1" -- "C_1" [label="test03"]
"C_1" -- "A_1" [label="test04"]
A_1 [label="A"]
B_1 [label="B"]
C_1 [label="C"]
}

What needs changing/adding to create a node as a label using |edgelabel|* in this code? I'm getting errors with everything I try.

Many thanks.

sfdp label_scheme example?

What is it you are trying to do? I ask because most users aren't going to need the label_scheme attribute.

remove edge label overlap

Erg

I am trying to remove edge label overlaps from duplicate edges with distinct label names for readibility. Label scheme's discription looks ideal for this purpose.

Regards
Steve

remove edge label overlap

If you want to avoid edge label overlap in sfdp, the simplest way is to get the 2.29 version of Graphviz. By default, it attempts to place edge labels so that they don't overlap.
The label_scheme mechanism requires that you specify your edge labels as nodes with a particular syntax, and is mainly used in certain application contexts.

Still getting edge label overlapping.

I have the same problem as original poster. I have built the latest 2.29 version of Graphviz but I still get a lot of edge label overlapping. Test graph I try to built is Plugin <em></em> Not Found and results of Plugin <em></em> Not Found and Plugin <em></em> Not Found have a lot to be desired in terms of clarity. For any tips I would be grateful.

Still getting edge label overlapping.

Placing edge labels without overlap is a new feature, using a fairly straightforward algorithm which attempts to place the label near the center of the edge. There are many ways this could be improved if and when someone gets the opportunity.
 
Meanwhile, there are ways to improve your drawings. The easiest is to provide more space for labels. There are various ways to do this. One way is to use the overlap_scaling attribute with prism. You probably will need to set overlap=prism0 as prism will attempt to reclaim space, defeating your desire for more. With neato, you can use a longer edge len. Unfortunately, these approaches require tweaking to get what you want.
 
A more radical approach is to follow dot's lead and make the edge labels into nodes. This can be done when generating the graph or by using a simple gvpr script. For your example, you would could use this input, and display it with sfdp -Goverlap_scaling=0 -Goverlap=prism to get this image. If desired, another pass with gvpr could turn the two line segments into smooth splines.
 

Recent comments