JuliaPy / JuliaPy/PyPlot.jl

wrong legend symbols when using handles and labels from get_legend_handles_labels

Aperta
#401 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
488
Fork
90
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello, when I try to use `get_legend_handles_labels` and use these handles and labels in the legend, I get wrong results for `errobar` plots with actual errors.

this works fine:

```julia
errorbar([1],[2],label = "no error")
errorbar([2],[2],[3],label = "with error")
legend()
```
![image](https://user-images.githubusercontent.com/998651/47157553-e66e4780-d2e9-11e8-8278-16f7ea85a1b9.png)

while this one produces a wrong result:

```julia
errorbar([1],[2],label = "no error")
errorbar([2],[2],[3],label = "with error")
h, l = gca()[:get_legend_handles_labels]()
legend(h,l)
```
![image](https://user-images.githubusercontent.com/998651/47157517-cb9bd300-d2e9-11e8-8e0b-59fe51721b14.png)

I cannot tell you where the problem lies but I hope this can be fixed or there is a workaround... Thanks.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Reproduce the two Julia examples using errorbar, get_legend_handles_labels, and legend(h,l), then compare the resulting legend symbols. Start by tracing the get_legend_handles_labels and legend entry points in PyPlot.jl and how they pass handles to matplotlib. Done means the explicit-handle form produces the same correct symbols as the direct legend() call, or a documented workaround is provided.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
julia, matplotlib
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.