Skip to content

Option for adding errorbar legend #440

Open
@kinyatoride

Description

@kinyatoride

Description

Hi, I think it will be great if we have an option to show error bar in the legend similar to what shade and fade do.

Current behavior

Currently, we cannot show error bar in the legend. Only the line is shown in the left figure.

import numpy as np
import pandas as pd
import proplot as pplt

state = np.random.RandomState(51423)
data = state.rand(20, 8).cumsum(axis=0).cumsum(axis=1)[:, ::-1]
data = data + 20 * state.normal(size=(20, 8)) + 30
data = pd.DataFrame(data, columns=np.arange(0, 16, 2))

fig, axs = pplt.subplots(ncols=2)

ax = axs[0]
h = ax.plot(data, means=True, label='label')
ax.legend(h)

ax = axs[1]
h = ax.plot(data, means=True, shadestd=1, label='label')
ax.legend(h)

output

Proplot version

3.4.3
0.9.7

Metadata

Metadata

Assignees

No one assigned

    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