Ticket #10514 (closed defect: fixed)
legend_label doesn't work when plotting multiple functions at the same time
| Reported by: | jason | Owned by: | jason, was |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-5.1 |
| Component: | graphics | Keywords: | so40.5 |
| Cc: | kcrisman | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Karl-Dieter Crisman |
| Authors: | Douglas McNeil | Merged in: | sage-5.1.beta4 |
| Dependencies: | #12960 | Stopgaps: |
Description (last modified by kcrisman) (diff)
This gives a legend:
plot(x,legend_label='test')+plot(x^2,legend_label='test')
but this doesn't:
plot([x,x^2], legend_label='test')
Apply trac_10514_multiple_function_legend.patch and trac_10514-reviewer.patch.
Attachments
Change History
Changed 12 months ago by dsm
-
attachment
trac_10514_multiple_function_legend.patch
added
be less aggressive about pruning legend labels
comment:2 Changed 12 months ago by dsm
- Keywords so40.5 added
- Status changed from new to needs_review
- Authors set to Douglas McNeil
Patch attached. Note that this depends upon trac_12960-fix_legend.2.patch, not for the fix itself, but for the doctest.
comment:4 Changed 12 months ago by kcrisman
- Dependencies changed from 12960 to #12960
Looking at this. Doug - note that it's best to use the #12960 syntax so one can click on the hyperlink created.
comment:5 Changed 12 months ago by kcrisman
I'm adding a doctest for people to see this as well in the live documentation.
Why the extra blank lines?
Also, note that even this didn't work before.
sage: q1 = plot([sin(x)], legend_label='trig'); q1
which I assume why you did the test you did.
Reviewer patch coming up.
comment:6 Changed 12 months ago by kcrisman
- Status changed from needs_review to positive_review
- Reviewers set to Karl-Dieter Crisman
- Description modified (diff)
Patchbot: Apply trac_10514_multiple_function_legend.patch and trac_10514-reviewer.patch.
comment:7 Changed 12 months ago by jdemeyer
- Status changed from positive_review to needs_work
This conflicts with #11998.
comment:10 Changed 11 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.1.beta4
