Opened 9 years ago
Closed 9 years ago
#12936 closed enhancement (fixed)
Adding plots should (at least attempt to) preserve legend options
Reported by: | mjo | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-5.1 |
Component: | graphics | Keywords: | |
Cc: | Merged in: | sage-5.1.beta1 | |
Authors: | Michael Orlitzky | Reviewers: | Andrey Novoseltsev |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The __add__()
method of plots doesn't make any attempt to preserve legend options. This will show the default legend:
sage: p1 = plot(x, x, 0, 1, legend_label='foo') sage: p1.set_legend_options(back_color='white', shadow=True) sage: p2 = p1 + p1 sage: p2._Graphics__legend_opts {}
We do preserve some other information, so it should be easy to add this.
Attachments (1)
Change History (7)
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 follow-up: ↓ 3 Changed 9 years ago by
- Reviewers set to Andrey Novoseltsev
- Status changed from needs_review to needs_work
comment:3 in reply to: ↑ 2 Changed 9 years ago by
- Description modified (diff)
Replying to novoselt:
This is a nice improvement, but the patch does not apply for me on Sage-5.0.rc0. Either it has to be rebased, or there are some dependencies.
Not only that, but I forgot to set any options in the description =)
I just built rc1 and will fix it.
comment:4 Changed 9 years ago by
- Status changed from needs_work to needs_review
Should be fixed now. It looks like that method was just moved to graphics.py
.
comment:5 Changed 9 years ago by
- Status changed from needs_review to positive_review
comment:6 Changed 9 years ago by
- Merged in set to sage-5.1.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This is a nice improvement, but the patch does not apply for me on Sage-5.0.rc0. Either it has to be rebased, or there are some dependencies.