Opened 6 years ago

Last modified 4 years ago

## #18711 new defect

# fix elliptic curve plot legends

Reported by: | kcrisman | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-6.8 |

Component: | graphics | Keywords: | |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

sage: Qx.<x>=PolynomialRing(QQ) sage: K.<a> = NumberField(x^2-2) sage: S = K.embeddings(RR) sage: E=EllipticCurve([a,0]) sage: F = E.base_extend(S[0]) sage: F.plot(legend_label='b') Launched png viewer for Graphics object consisting of 2 graphics primitives

The legend label appears twice, because

sage: F.plot?? ... for j in range(len(I)): a,b,shape = I[j] v = generate_plot_points(f1, (a, b), plot_points, adaptive_tolerance, adaptive_recursion, randomize) w = generate_plot_points(f2, (a, b), plot_points, adaptive_tolerance, adaptive_recursion, randomize) if shape == 'o': g += plot.line(v + list(reversed(w)) + [v[0]], **args) elif shape == '<': g += plot.line(list(reversed(v)) + w, **args) elif shape == '>': g += plot.line(v + list(reversed(w)), **args) else: g += plot.line(v, **args) g += plot.line(w, **args) return g

### Attachments (1)

### Change History (3)

### comment:1 Changed 6 years ago by

### comment:2 Changed 4 years ago by

Ticket #23063 might be a duplicate.

**Note:**See TracTickets for help on using tickets.

One could monkey in a solution for legend stuff but in truth there are a lot of legend options and so it would be better to have a cleaner solution, such as one that did the plots first and *then* passed in keyword arguments, if that were possible.