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

Commit

Permalink
doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno-TT authored and dimpase committed Jan 6, 2023
1 parent 7ed7e6c commit da8a8f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/matrix/operation_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,13 @@ def matrix_of_variables(self):
for i in range(self._n) for j in range(self._n)]
return MS(entries)

# documentation hack
# makes the cmap default argument look nice in the docs
# by copying the gist_rainbow object and overriding __repr__
gist_rainbow_copy=copy(gist_rainbow)
class ReprOverrideLinearSegmentedColormap(gist_rainbow_copy.__class__):
def __repr__(self):
return "Matplotlib gist_rainbow colormap"
return "gist_rainbow"
gist_rainbow_copy.__class__=ReprOverrideLinearSegmentedColormap


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

# Base matrix plot object, without text
Expand Down

0 comments on commit da8a8f5

Please sign in to comment.