Skip to content

Docs for hvplot error bars yerr1 #421

Open
@ahuang11

Description

@ahuang11
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions