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

pyplot.bar does not cycle through colors (>2.0.0b1) #7891

Copy link
Copy link
Closed
@msspektor

Description

@msspektor
Issue body actions

I hope I'm not reporting an issue that's already known. Starting with matplotlib==2.0.0b1, pyplot.bar does not cycle through colors anymore. Instead, if I pass list of colors, it only uses color 'C0'.

Minimum code to reproduce bug:

import matplotlib.pyplot as plt
x_pos = [0, 1, 2]
heights = [1, 2, 3]
colors = ['0.2', '0.5', '0.8']
print('Works properly:')
[plt.bar(left=x_pos[ii], height=heights[ii], color=colors[ii]) for ii in range(len(x_pos))]
plt.show()
print('Does not work aynmore:')
plt.bar(left=x_pos, height=heights, color=colors)
plt.show()

Output:

img

Here's the output using the same code with matplotlib==1.5.3

img2

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

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