8000 bar plot yerr lines/caps should respect zorder · Issue #14039 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
bar plot yerr lines/caps should respect zorder #14039
Closed
@LindyBalboa

Description

@LindyBalboa

Bug report

Bug summary

Bar plot error bars break when zorder is greater than 1.

fig, ax = plt.subplots(1,1)
xm1 = [-2, -1, 0]
x = [1, 2, 3]
x2 = [4, 5, 6]
x3 = [7, 8, 9]
y = [1,2,3]
yerr = [0.5, 0.5, 0.5]

ax.bar(x=xm1, height=y, yerr=yerr, capsize=5, zorder=-1)
ax.bar(x=x, height=y, yerr=yerr, capsize=5, zorder=1)
ax.bar(x=x2, height=y, yerr=yerr, capsize=5, zorder=2)
ax.bar(x=x3, height=y, yerr=yerr, capsize=5, zorder=3) # Applies for zorder>=3
fig.show()

Actual outcome
image

Matplotlib version

  • Operating system: Arch Linux
  • Matplotlib version: 2.2.3
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.6
  • Jupyter version (if applicable): 5.7.0
  • Conda default channel

Possible related issue: #1622

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0