Opened 4 years ago
Closed 21 months ago
#23063 closed defect (duplicate)
Duplicate legend_label appears on the final plot in graphics_array
Reported by: | rolandog | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graphics | Keywords: | graphics_array, legend_label |
Cc: | kcrisman, mkoeppe, egourgoulhon | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This is a bug I stumbled into when creating a graphics_array where each plot has a legend_label string. I created a Minimal Working Example (MWE) and will attach an image with the current result.
Also, upon googling I stumbled into an ask.sagemath thread that pointed to a somewhat related Trac ticket #12591.
I found what I think is a closer match by finding Trac ticket #18711 (but I still don't know enough about Sage's internals to correctly point to what is going on). That bug is still reproducible by kcrisman's code.
Does this warrant a separate ticket? Or should this be merged into #18711 ?
Here is my MWE:
def y(x=1, m=1, b=0): return m * x + b data = [[[x, y(x=x, m=i, b=i)] for x in [1, 2, 3]] for i in [1, 2, 3, 4]] plots = [list_plot(data=d, legend_label=str(k + 1), plotjoined=True) for k, d in enumerate(data)] graphics_array(((plots[0], plots[1]), (plots[2], plots[3])))
And here is the MWE of #18711 :
Qx.<x>=PolynomialRing(QQ) K.<a> = NumberField(x^2-2) S = K.embeddings(RR) E=EllipticCurve([a,0]) F = E.base_extend(S[0]) F.plot(legend_label='b')
Attachments (1)
Change History (5)
Changed 4 years ago by
comment:1 Changed 4 years ago by
In fact, as explained in #12591, the complete last figure is duplicated (superposed with itself). Fixing this requires some expert in matplotlib, which I am not.
NOTE that the blue color is darker in the bottom left of your picture, for the same reason.
comment:2 Changed 4 years ago by
- Cc mkoeppe added
comment:3 Changed 21 months ago by
- Cc egourgoulhon added
- Milestone changed from sage-8.0 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
comment:4 Changed 21 months ago by
- Resolution set to duplicate
- Status changed from needs_review to closed
MWE showing duplicate legend_label entry for graphics_array