Closed sfreedman67 closed 1 year ago
As you might have seen, the code of Polygon.plot
at lines 942-951 of polygon.py is not very flexible
def plot(self, translation=None):
P = self.vertices(translation)
return point2d(P, color='red') + line2d(P + (P[0],), color='orange') + polygon2d(P, alpha=0.3)
Ideally, all arguments of plot
should be forwarded to either point2d
, line2d
or polygon2d
functions. However, it is not clear what should be the design for the options. Maybe we should just follow sage Polyhedron
with a point
, line
and polygon
arguments.
Note that polygon2d by itself already draws the boundary, so that adding line2d is not necessary.
Note that polygon2d by itself already draws the boundary, so that adding line2d is not necessary.
Probably the reason here was to only have "alpha" on the fill but not on the outline?
@sfreedman67 this is actually supported:
s = flatsurf.translation_surfaces.octagon_and_squares()
g = s.graphical_surface()
g.polygon_options['fill'] = None
g.plot()
@sfreedman67 please reopen if I missed something here.
@sfreedman67 also note that https://github.com/flatsurf/sage-flatsurf/issues/109 will try to implement what you had proposed initially, namely S.plot(fill=None)
to do the right thing.
It would be nice to make plots in sage-flatsurf that don't have fill:
Here is my current workaround: