Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA' g = DiGraph({}, loops=True, multiedges=True) for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

g.plot(edge_style='solid', layout='circular', edge_labels=True, vertex_color='red').show(figsize=(8,8))

lines squared

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

works but monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA' g = DiGraph({}, loops=True, multiedges=True) for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

g.plot(edge_style='solid', layout='circular', edge_labels=True, vertex_color='red').show(figsize=(8,8))

lines squaredsuared of the correct number of lines

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

works but monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA' 'ABCCCCDABCDABCDA'

g = DiGraph({}, loops=True, multiedges=True) multiedges=True)

for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

suared of the correct number of lines

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

works but monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA'

g = DiGraph({}, loops=True, multiedges=True)

for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

suared

This produces squared of the correct number of lines

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

works

This produces the correct number of lines but it is monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA'

g = DiGraph({}, loops=True, multiedges=True)

for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

This produces squared of the correct number of lines

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

This produces the correct number of lines but it is monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add "color_by_label" for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample

stnc = 'ABCCCCDABCDABCDA'

g = DiGraph({}, loops=True, multiedges=True)

for a,b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: g.add_edge(a, b, b)

This produces squared of the correct number of lineslines SQUARED

g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

This produces the correct number of lines but it is monchrome

g.plot(layout='circular').show(figsize=(8,8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. it. When I add "color_by_label" color_by_label for plotting a digraph I get the correct correct number SQUARED of lines appearing in the digraph. Is this an error error in SageMath or is there a workaround? All monochrome lines lines do not work for my application.

This is my code samplesample:

stnc = 'ABCCCCDABCDABCDA'

'ABCCCCDABCDABCDA' g = DiGraph({}, loops=True, multiedges=True)

multiedges=True) for a,b a, b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]: 1)]: g.add_edge(a, b, b)

b)

# This produces the correct number of lines SQUARED

SQUARED g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8,8))

layout='circular').show(figsize=(8, 8))

This produces the correct # Correct number of lines but it is monchrome

g.plot(layout='circular').show(figsize=(8,8))

monochrome g.plot(layout='circular').show(figsize=(8, 8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add color_by_label for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample:

stnc = 'ABCCCCDABCDABCDA'
g = DiGraph({}, loops=True, multiedges=True)
for a, b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]:
    g.add_edge(a, b, b)

# This produces the correct number of lines SQUARED
g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8, 8))

# Correct number of lines but monochrome
g.plot(layout='circular').show(figsize=(8, 8))

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add color_by_label for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample:

stnc = 'ABCCCCDABCDABCDA'
g = DiGraph({}, loops=True, multiedges=True)
for a, b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]:
    g.add_edge(a, b, b)

sage: g.edges()
[('A', 'B', 'B'), ('A', 'B', 'B'), ('A', 'B', 'B'),
 ('B', 'C', 'C'), ('B', 'C', 'C'), ('B', 'C', 'C'),
 ('C', 'C', 'C'), ('C', 'C', 'C'), ('C', 'C', 'C'),
 ('C', 'D', 'D'), ('C', 'D', 'D'), ('C', 'D', 'D'),
 ('D', 'A', 'A'), ('D', 'A', 'A'), ('D', 'A', 'A')]

# This produces the correct number of lines SQUARED
g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8, 8))

# Correct number of lines but monochrome
g.plot(layout='circular').show(figsize=(8, 8))

Incorrect edge multiplicity for multidigraph with color_by_label

Each edge should have multiplicity 3. In the plot with color edges, each has multiplicity 9. The plot with no colors has correct multiplicity 3 for each edge.

Plot "color_by_label" produces SQUARED number of lines in digraph

I bumped into this unusual behavior and am not sure how to fix it. When I add color_by_label for plotting a digraph I get the correct number SQUARED of lines appearing in the digraph. Is this an error in SageMath or is there a workaround? All monochrome lines do not work for my application.

This is my code sample:

stnc = 'ABCCCCDABCDABCDA'
g = DiGraph({}, loops=True, multiedges=True)
for a, b in [(stnc[i], stnc[i + 1]) for i in range(len(stnc) - 1)]:
    g.add_edge(a, b, b)

sage: g.edges()
[('A', 'B', 'B'), ('A', 'B', 'B'), ('A', 'B', 'B'),
 ('B', 'C', 'C'), ('B', 'C', 'C'), ('B', 'C', 'C'),
 ('C', 'C', 'C'), ('C', 'C', 'C'), ('C', 'C', 'C'),
 ('C', 'D', 'D'), ('C', 'D', 'D'), ('C', 'D', 'D'),
 ('D', 'A', 'A'), ('D', 'A', 'A'), ('D', 'A', 'A')]

# This produces the correct number of lines SQUARED
g.plot(color_by_label=True, edge_style='solid', layout='circular').show(figsize=(8, 8))

# Correct number of lines but monochrome
g.plot(layout='circular').show(figsize=(8, 8))

Incorrect edge multiplicity for multidigraph with color_by_label

Each edge should have multiplicity 3. In the plot with color edges, each has multiplicity 9. The plot with no colors has correct multiplicity 3 for each edge.