#9190: plot options reset does not reset the options dictionary
------------------------+---------------------------------------------------
Reporter: jason | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-4.4.4
Component: graphics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Description changed by jason:
Old description:
> Note:
>
> {{{
> sage: plot.options
> {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200,
> 'thickness': 1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor':
> 'automatic', 'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0,
> 1), 'fill': None}
> sage: plot.defaults()
> {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200,
> 'thickness': 1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor':
> 'automatic', 'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0,
> 1), 'fill': None}
> sage: plot.options['fill']=True
> sage: plot.options
> {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200,
> 'thickness': 1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor':
> 'automatic', 'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0,
> 1), 'fill': True}
> sage: plot.reset()
> sage: plot.options
> {'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200,
> 'thickness': 1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor':
> 'automatic', 'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0,
> 1), 'fill': True}
> }}}
>
> Note that the last plot.options should have fill=None, but instead is
> fill=True. The funny thing is that the actual plots are correct (i.e.,
> when the default fill is set to True, filling happens, but when reset,
> filling doesn't happen).
New description:
Note:
{{{
sage: plot(x^2,(x,-1,1)) # no filling happens
<html><font color='black'><img src='cell://sage0.png'></font></html>
sage: plot.options
{'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness':
1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic',
'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0, 1), 'fill':
True}
sage: plot.defaults()
{'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness':
1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic',
'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0, 1), 'fill':
None}
sage: plot.options['fill']=True
sage: plot(x^2,(x,-2,2)) # no filling happens - bug
<html><font color='black'><img src='cell://sage0.png'></font></html>
sage: plot.options
{'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness':
1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic',
'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0, 1), 'fill':
True}
sage: plot.reset()
sage: plot.options # fill is still set to True - bug
{'fillalpha': 0.5, 'detect_poles': False, 'plot_points': 200, 'thickness':
1, 'alpha': 1, 'adaptive_tolerance': 0.01, 'fillcolor': 'automatic',
'adaptive_recursion': 5, 'exclude': None, 'rgbcolor': (0, 0, 1), 'fill':
True}
}}}
On other things (like contour_plot), it appears that changing the fill
default actually affects the plot, but doing contour_plot.reset() doesn't
reset the option.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9190#comment:1>
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.