Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Matplotlib polygons do have edgecolor as a keyword. Currently the way Sage wraps these you might have to do a little work to get that to work out right. In principle the following should work, but it doesn't seem to:

sage: P = polygon([[0,0],[0,1],[2,1],[1,0]],color='limegreen', thickness=2)
sage: p = P.matplotlib()
sage: p.set_edgecolor('black')
sage: from matplotlib.backends.backend_agg import FigureCanvasAgg
sage: p.set_canvas(FigureCanvasAgg(p))
sage: p.savefig('test.png')

as can be seen by trying

sage: !open test.png

Matplotlib has added a lot of functionality we haven't wrapped properly yet.