Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zorder is not respected by all parts of errorbar  #1622

Copy link
Copy link
Closed
@tacaswell

Description

@tacaswell
Issue body actions

This was found by via a SO question (http://stackoverflow.com/questions/14003572/how-to-force-errorbars-to-render-last-with-matplotlib)

It looks like the root cause of this issue is that LineCollections do not take zorder as a parameter.

The hacky work around is to put negative zorder on the lines you want to be below the error bars.

import matplotlib.pyplot as plt
fig = plt.figure()
ax = plt.gca()
[ax.plot(rand(50),color='0.75') for j in range(122)];
ax.errorbar(range(50),rand(50),yerr=.3*rand(50))
plt.draw()

eb_wrong

fig = plt.figure()
ax = plt.gca()
[ax.plot(rand(50),color='0.75',zorder=-32) for j in range(122)];
ax.errorbar(range(50),rand(50),yerr=.3*rand(50))
plt.draw()

eb_hack

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.