Skip to content

Commit b6accf1

Browse files
Bruno-TTdimpase
authored andcommitted
docstring fix proof-of-concept
1 parent ce4e9af commit b6accf1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sage/matrix/operation_table.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from sage.plot.matrix_plot import matrix_plot
2020
from sage.matrix.constructor import Matrix
2121
from sage.plot.text import text
22+
from sage.all import copy
2223

2324

2425
class OperationTable(SageObject):
@@ -954,7 +955,14 @@ def matrix_of_variables(self):
954955
for i in range(self._n) for j in range(self._n)]
955956
return MS(entries)
956957

957-
def color_table(self, element_names=True, cmap=gist_rainbow, **options):
958+
gist_rainbow_copy=copy(gist_rainbow)
959+
class ReprOverrideLinearSegmentedColormap(gist_rainbow_copy.__class__):
960+
def __repr__(self):
961+
return "Matplotlib gist_rainbow colormap"
962+
gist_rainbow_copy.__class__=ReprOverrideLinearSegmentedColormap
963+
964+
965+
def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options):
958966
r"""
959967
Returns a graphic image as a square grid where entries are color coded.
960968

0 commit comments

Comments
 (0)