hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Docs for hvplot error bars yerr1

Open ahuang11 opened this issue 5 years ago • 0 comments

yerr1 : string, optional
    Field name to draw symmetric / negative errors from

Maybe better to say

yerr1 : string, optional
    Field name to draw symmetric / negative errors from (but the values should be positive)

(and the holoviews error bar page too seems unclear http://holoviews.org/reference/elements/matplotlib/ErrorBars.html)

This will yield an incorrect plot:

tst = pd.DataFrame({'x': [0, 1, 2], 'y': [0, 0, 0], 'yerr1': [-1, -2, -3], 'yerr2': [1, 1, 1]})
tst.hvplot.errorbars('x', 'y', 'yerr1', 'yerr2')

image

This is correct

import pandas as pd
import hvplot.pandas
tst = pd.DataFrame({'x': [0, 1, 2], 'y': [0, 0, 0], 'yerr1': [1, 2, 3], 'yerr2': [1, 1, 1]})
tst.hvplot.errorbars('x', 'y', 'yerr1', 'yerr2')

image

ahuang11 avatar Mar 01 '20 02:03 ahuang11