Skip to content

Figure legend doesn't properly treat errorbars #533

@smithsp

Description

@smithsp

Consider:

from pylab import *
x = arange(0,1,.01)
y = x**2
fig = figure(2)
ax = fig.add_subplot(111)
errorbar(x,y,yerr=x/10.,label='$x^2$')
errorbar(x,y**3,yerr=x/10.,label='$x^6$')
legend(loc='upper center')
h,l = ax.get_legend_handles_labels()
fig.legend(h,l,loc='lower right')

I am getting the right legend for the axes based legend, but the figure based legend seems to be using the different parts of the errorbar for subsequent handles, instead of using them as a group.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions