FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BUG: incorrect error bar colors when NaN values are present · Issue #13799 · matplotlib/matplotlib · GitHub

Repository navigation

BUG: incorrect error bar colors when NaN values are present #13799

Closed

Description

Bug report

Bug summary

When using variable colors for error bars, the colors are incorrect/shifted if NaN values are present.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

x = [1, np.nan, 3, 4, 5]
colors = ['red', 'green', 'blue', 'purple', 'orange']

fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.scatter(x, x, c=colors, s=100)
ax.errorbar(x, x, xerr=0.2, yerr=0.2, ecolor=colors, fmt='none')
fig.savefig('errorbar_colors.png')

Actual outcome

Expected outcome

Matplotlib version

  • Operating system: MacOS X 10.14.2
  • Matplotlib version: 3.0.3 (from pip)
  • Matplotlib backend: Agg
  • Python version: 3.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL