Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
This commit introduces a custom bar plot function#26314
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
formatted the setup.py code a bit
Thank you for your contribution@Saunakghosh10! Please could you revert the changes to There are also several style issues highlighted by the |
okay thank you |
story645 commentedJul 16, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for making this example! Can you please write it using ax. API to conform to our style guidelines?https://matplotlib.org/devdocs/devel/document.html#write-examples-and-tutorials If you're not sure how, please ask here or in our chat. Eta: also please revert the changes to 3D bar since there isn't anything especially related to 3D here. |
timhoffm commentedJul 16, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the desire to improve our examples! Please describe more clearly what the purpose is. As of now, I do not see the benefit of adding this
is already provided by the builtin
|
import matplotlib.pyplot as plt def custom_bar_plot(labels, values, colors=None):
|
Agree, that's why I suggested it as a new section in the bar color demo. @Saunakghosh10 great that it's now in |
okay on it |
Also, to revert the changes to setup.py and to the plot_gallery example, tryhttps://git-scm.com/docs/git-reset#Documentation/git-reset.txt-Resetasinglefileintheindex |
@Saunakghosh10 are you still interested in working on this? |
yes I am and I and I am working on that only tbh.. |
rcomer commentedMay 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm going to mark this as "draft" for now. Please mark it as "ready for review" when you are ready. In the meantime, if you need help, feel free to ask questions here. Or you may prefer to ask them in ourincubator gitter room. |
Closing because of the need for additional functionality is not clear. |
Commit
This commit introduces a custom bar plot function and provides an example of usage inside the code. The custom bar plot function allows users to create bar plots with customizable labels, values, and colours. It enhances the functionality of the code by providing a convenient way to visualize data.
The
custom_bar_plot
function takes in an array-like object oflabels
representing the categories, an array-like object ofvalues
representing the values for each category, and an optional array-like object ofcolours
specifying the custom colours for each bar. If thecolours
parameter is not provided, default colours from theViridis
colourmap are used.The example usage section demonstrates how to use the
custom_bar_plot
function by creating a bar plot with sample data. Thelabels
list contains the categories, thevalues
list contains the corresponding values, and thecolours
list specifies custom colours for each bar. Running the code will generate a bar plot with labelled categories, values, and a title.This commit improves the code by adding a versatile function for custom bar plotting, enhancing the visualization capabilities and allowing users to tailor the appearance of their plots to their specific needs.