Change Error Bar Markers (Caplines) in Pandas Bar Plot

Viewed 12246

so I am plotting error bar of pandas dataframe. Now the error bar has a weird arrow at the top, but what I want is a horizontal line. For example, a figure like this: But now my error bar ends with arrow instead of a horinzontal line.

Here is the code i used to generate it:

plot = meansum.plot(
    kind="bar",
    yerr=stdsum,
    colormap="OrRd_r",
    edgecolor="black",
    grid=False,
    figsize=(8, 2),
    ax=ax,
    position=0.45,
    error_kw=dict(ecolor="black", elinewidth=0.5, lolims=True, marker="o"),
    width=0.8,
)

So what should I change to make the error become the one I want. Thx.

2 Answers
Related