Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 21266 trying to fix doctests in generic_graph color_by_label
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Aug 18, 2016
1 parent 3c85228 commit 4a3b20f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sage/graphs/generic_graph.py
Expand Up @@ -17342,14 +17342,14 @@ def _color_by_label(self, format='hex', as_function=False, default_color = "blac
The default output is a dictionary assigning edges to colors::

sage: G._color_by_label()
{'#0000ff': [((1,3,2,4), (1,4)(2,3), 3), ..., ((1,3), (1,4,3), 3)],
'#00ff00': [((1,3,2,4), (1,2,4), 2), ..., ((1,3), (1,2,3), 2)],
'#ff0000': [((1,3,2,4), (1,3)(2,4), 1), ..., ((1,3), (1,3,2), 1)]}
{'#0000ff': [((1,3,2,4), (1,4)(2,3), 3), ...],
'#00ff00': [((1,3,2,4), (1,2,4), 2), ...],
'#ff0000': [((1,3,2,4), (1,3)(2,4), 1), ...]}

sage: G._color_by_label({1: "blue", 2: "red", 3: "green"})
{'blue': [((1,3,2,4), (1,3)(2,4), 1), ..., ((1,3), (1,3,2), 1)],
'green': [((1,3,2,4), (1,4)(2,3), 3), ..., ((1,3), (1,4,3), 3)],
'red': [((1,3,2,4), (1,2,4), 2), ..., ((1,3), (1,2,3), 2)]}
{'blue': [((1,3,2,4), (1,3)(2,4), 1), ...],
'green': [((1,3,2,4), (1,4)(2,3), 3), ...],
'red': [((1,3,2,4), (1,2,4), 2), ...]}

TESTS:

Expand Down

0 comments on commit 4a3b20f

Please sign in to comment.