Skip to content

Add custom_bar_plot() function #26310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Saunakghosh10
Copy link

Add custom_bar_plot() function

The custom_bar_plot() function allows for creating bar plots with custom colours for each bar. It provides flexibility in customizing the appearance of bar plots by accepting arrays of labels, values, and optional colours.

The function includes proper documentation with docstrings and follows the Matplotlib coding style.

PR summary

PR checklist

formatted the setup.py code a bit
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@story645
Copy link
Member

story645 commented Jul 14, 2023

Thanks for the PR, but what you've done here is add another example to one of our galleries rather than implement a new plotting method.

The plot type gallery is very heavily curated to only show a subset of plotting methods that are implemented on the axes object, and the bar for getting a new plotting function is very high; therefore, this PR is not gonna make it in as is. ETA: the reason we're unlikely to accept this as a new plotting method, even with heavy revision, is because this is modifying one aspect of a bar chart and not something conceptually distingushable enough to warrant a whole new API. ETA2: potentially there's an argument for making bar color behave more like scatter color (which allows for single color, list of color, and colormapped values) but that would require standalone discussion.

But, what I think what you're demonstrating here is something folks ask about somewhat frequently, and so could potentially be a good addition/subsection of the bar color demo

So, to get this PR to something that I think could go in:

  1. add a "use colormap to color" section to the bar color demo and move the code into that demo
  2. rewrite it using the object oriented style of the other example

@rcomer
Copy link
Member

rcomer commented Jul 15, 2023

It looks like this is superseded by #26314, so I will close it. Please comment and/or re-open if I have that wrong.

@Saunakghosh10
Copy link
Author

can you help me in passing all the checks..I am not getting that part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants