Skip to content

Commit 4acfcdb

Browse files
Bruno-TTdimpase
authored andcommitted
doc plot attempt
1 parent d85cf19 commit 4acfcdb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/sage/matrix/operation_table.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,19 @@ def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options):
981981
sage: OT.color_table()
982982
Graphics object consisting of 37 graphics primitives
983983
984+
985+
.. PLOT::
986+
import matplotlib.pyplot as plt
987+
from sage.matrix.operation_table import OperationTable
988+
from sage.all import SymmetricGroup, operator
989+
OT = OperationTable(SymmetricGroup(3), operation=operator.mul)
990+
fig = OT.color_table().matplotlib()
991+
managed_fig=plt.figure()
992+
canvas_manager = managed_fig.canvas.manager
993+
canvas_manager.canvas.figure=fig
994+
fig.set_canvas(canvas_manager.canvas)
995+
plt.show()
996+
984997
"""
985998

986999
# Base matrix plot object, without text

0 commit comments

Comments
 (0)