Skip to content

Commit da8a8f5

Browse files
Bruno-TTdimpase
authored andcommitted
doc tweaks
1 parent 7ed7e6c commit da8a8f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sage/matrix/operation_table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,10 +950,13 @@ def matrix_of_variables(self):
950950
for i in range(self._n) for j in range(self._n)]
951951
return MS(entries)
952952

953+
# documentation hack
954+
# makes the cmap default argument look nice in the docs
955+
# by copying the gist_rainbow object and overriding __repr__
953956
gist_rainbow_copy=copy(gist_rainbow)
954957
class ReprOverrideLinearSegmentedColormap(gist_rainbow_copy.__class__):
955958
def __repr__(self):
956-
return "Matplotlib gist_rainbow colormap"
959+
return "gist_rainbow"
957960
gist_rainbow_copy.__class__=ReprOverrideLinearSegmentedColormap
958961

959962

@@ -980,7 +983,7 @@ def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options):
980983
981984
from sage.matrix.operation_table import OperationTable
982985
OTa = OperationTable(SymmetricGroup(3), operation=operator.mul)
983-
sphinx_plot(OTa.color_table())
986+
sphinx_plot(OTa.color_table(), figsize=(3.0,3.0))
984987
"""
985988

986989
# Base matrix plot object, without text

0 commit comments

Comments
 (0)