Opened 7 years ago
Last modified 7 years ago
#18543 new defect
legend label doesn't distinguish line and dash
Reported by: | kcrisman | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.8 |
Component: | graphics | Keywords: | |
Cc: | ppurka | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Compare the output of these three.
sage: plot(x,(x,1,100),linestyle=':', legend_label='foo') sage: plot(x,(x,1,100),linestyle='--', legend_label='foo') sage: plot(x,(x,1,100),linestyle='-', legend_label='foo')
There is a very subtle difference between the last two, I think, but not enough to be useful. Let's fix this.
Originally reported at this ask.sagemath question.
Change History (8)
comment:1 Changed 7 years ago by
comment:2 follow-up: ↓ 3 Changed 7 years ago by
I am pretty sure this should work : legend_handlelength=2,
. I used this some years earlier in my work. See the end of the file here : https://github.com/ppurka/papers/blob/master/decoding_permutations/sage/run_simulation.sage
comment:3 in reply to: ↑ 2 Changed 7 years ago by
I am pretty sure this should work :
legend_handlelength=2,
. I used this some years earlier in my work. See the end of the file here : https://github.com/ppurka/papers/blob/master/decoding_permutations/sage/run_simulation.sage
I tried that, but only P.set_legend_options(handlelength=2)
seemed to work. Maybe I needed to do it in show
and not just the plot?
Anyway, the ticket is about defaults and what we should have to fix this.
comment:4 Changed 7 years ago by
Yes. I think the legends are parsed during show or save, not in plot.
comment:5 Changed 7 years ago by
So maybe that is also a bug, that one can't just send legend_handlelength=2
directly in plot
. What do you think?
comment:6 Changed 7 years ago by
There are many things that can't be set through plot I think. This is not really a bug.
comment:7 Changed 7 years ago by
Ok. It is a bug since the documentation days "Extra options will get passed on to show(), as long as they are valid:"
Note that the legend options allow this to be fixed, in principle, but I'm not sure what the defaults should be.