id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
11677 Polygon fill doesn't work kcrisman jason was "From [http://groups.google.com/group/sage-support/browse_thread/thread/ad4f646974dbc847 this sage-support thread]:
----
Hello,
{{{
------- -----------
P = polygon([[1,2], [5,6], [5,0]], fill = False, color='red')
P
------- -----------
}}}
still fills the polygon, is there another way to turn off color fill.
Thanks.
-Giri
----
The fix is to add
{{{
z = int(options.pop('zorder', 1))
p.set_alpha(a)
+ f = options.pop('fill', True)
+ p.set_fill(f)
c = to_mpl_color(options['rgbcolor'])
p.set_edgecolor(c)
}}}
in `Polygon._render_on_subplot` in sage/plot/polygon.py.
Notice that this means to actually ''get'' such a polygon, you would need to set the thickness. Is that a bug? We do intentionally have the thickness 0 in the `@options`.
{{{
sage: P = polygon([[1,2], [5,6], [5,0]], fill = False, thickness=1) ; P
sage: P = polygon([[1,2], [5,6], [5,0]], fill = False) ; P
}}}
----
Apply [attachment:11677_polygon_fill_flat.patch]." defect closed minor sage-5.0 graphics fixed beginner sd35.5 jason sage-5.0.beta2 Karl-Dieter Crisman, Kenneth Smith, Peter Story Peter Story, Kenneth Smith, Karl-Dieter Crisman N/A