#11677: Polygon fill doesn't work
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: jason, was
Type: defect | Status: new
Priority: minor | Milestone: sage-4.7.2
Component: graphics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
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', False)
+ 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
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11677>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.