Opened 12 years ago

Last modified 8 years ago

#9190 new defect

plot options reset does not reset the options dictionary

Reported by: Jason Grout Owned by: jason, was
Priority: major Milestone: sage-6.4
Component: graphics Keywords:
Cc: Mike Hansen Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jason Grout)

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.

Change History (5)

comment:1 Changed 12 years ago by Jason Grout

Description: modified (diff)

comment:2 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:3 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:4 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:5 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4
Note: See TracTickets for help on using tickets.