JuliaPy / JuliaPy/PyPlot.jl

wrong legend symbols when using handles and labels from get_legend_handles_labels

未关闭
#401 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
488
派生
90
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
julia, matplotlib
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。