biggles icon indicating copy to clipboard operation
biggles copied to clipboard

combine error bars and points

Open esheldon opened this issue 8 years ago • 4 comments

The idea here is that points and their error bars really should be tied together

currently in PlotKey the error bar does not show, which can be confusing I think.

also error bars are not themselves fully fledged objects in some way I don't understand; for example they cannot have labels and thus you can't use them by themselves and put that in a PlotKey.

So maybe we can combine error bars and Points. This would also be convenient. e.g.

# standard symmetric y error bars
pts = Points(x, y, yerr=yerr)

# both x and y
pts = Points(x, y, xerr=xerr, yerr=yerr)

# asymmetric y error bars
pts = Points(x, y, ylow=ylow, yhigh=yhigh)

esheldon avatar Mar 29 '17 19:03 esheldon

I like this as an addition to the points object. However, maybe we can keep errro bars as their own objects (and make them on par with everything else)?

This doesn't break the API and would fix several of the things you pointed out.

beckermr avatar Mar 29 '17 22:03 beckermr

yes, keep them as their own objects.

the problem is I really don't understand the rendering, so I don't know how yet to do this combination so that they show up as a single entity and can appear in the PlotKey :-P

esheldon avatar Mar 30 '17 00:03 esheldon

Ugh me too. I feel like I had a grasp on this a few years back. More reading to do...

beckermr avatar Mar 30 '17 00:03 beckermr

Refreshing myself on the source code this morning. I think we need to override the make_key method in _PlotComponent for objects which cannot produce labels right now.

Any plot object that inherits from _PlotComponent directly will need this.

Also, this code is due for a huge refactor.

beckermr avatar Mar 30 '17 12:03 beckermr