#12297: Fix using of options that might not exist
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: jason, was
Type: defect | Status: new
Priority: minor | Milestone: sage-5.0
Component: graphics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
{{{
sage: from sage.plot.polygon import Polygon
sage: G = Graphics()
sage: G.add_primitive(Polygon([1,2,3],[3,2,1],{}))
sage: G
<snip>
/Users/.../sage-4.8.alpha5/local/lib/python2.6/site-
packages/sage/plot/polygon.pyc in _render_on_subplot(self, subplot)
239 options = self.options()
240 p = patches.Polygon([(self.xdata[i],self.ydata[i]) for i
in xrange(len(self.xdata))])
--> 241 p.set_linewidth(float(options['thickness']))
242 a = float(options['alpha'])
243 z = int(options.pop('zorder', 1))
KeyError: 'thickness'
}}}
Not really important because one isn't normally going to use `Polygon`
empty, but sometimes in other internal code one will use primitives.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12297>
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.