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

[ENH]: Make it so that linestyle works the same way as color when plotting several bars, lines, scatter points, etc. #23222

Copy link
Copy link
Closed
@AndreasBugten

Description

@AndreasBugten
Issue body actions

Problem

Hello!

I am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of linestyles, and then simply plot the bars and set the color and linestyle to their respective lists. This works for color, but not for linestyle, since the linestyle function does not recognize a list as input.

Below I have two code snippets, and their respective outputs, which highlights the problem.

First, without using linestyle:
image

Then, using linestyle:
image

I have checked that all of the linestyles are compatible with the plt.bar function.

Proposed solution

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No 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.