Skip to content

Changing bar examples to tea and coffee - #23590

Merged
timhoffm merged 24 commits into
matplotlib:mainfrom
SourajitaDewasi:change_bar_examples
Aug 27, 2022
Merged

timhoffm merged 24 commits into
matplotlib:mainfrom
SourajitaDewasi:change_bar_examples

Conversation

@SourajitaDewasi

@SourajitaDewasi SourajitaDewasi commented Aug 9, 2022 •

Copy link
Copy Markdown
Contributor

PR Summary

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related. [N/A]
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there). [N/A]
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there). [N/A]
  • Documentation is sphinx and numpydoc compliant (the docs should build without error). [N/A]

cc: @jklymak

@SourajitaDewasi
SourajitaDewasi marked this pull request as draft August 9, 2022 18:20

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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 while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. 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.

@jklymak

jklymak commented Aug 12, 2022

Copy link
Copy Markdown
Member

This looks good, except for the flake8 error. However, would you also be willing to do the same for the stacked bars as well?

@SourajitaDewasi

Copy link
Copy Markdown
Contributor Author

I will complete for the flake8 error and the stacked bars example too by 15th August 2022 @jklymak

@SourajitaDewasi

Copy link
Copy Markdown
Contributor Author

How to resolve this issue of ci/circleci: docs. I am facing this issue in both:

  1. examples/lines_bars_and_markers/bar_label_demo.py
  2. examples/units/bar_unit_demo.py

Can someone please help me out here

@QuLogic

QuLogic commented Aug 17, 2022

Copy link
Copy Markdown
Member

There is no problem in those files; the problem is you need to rebase your branch on current main.

@scottshambaugh

scottshambaugh commented Aug 18, 2022 •

Copy link
Copy Markdown
Contributor

When complete, this closes #23352

@SourajitaDewasi
SourajitaDewasi marked this pull request as ready for review August 19, 2022 14:26

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I

ax.axhline(0, color='grey', linewidth=0.8)
ax.set_ylabel('Scores')
ax.set_title('Scores by group and gender')
ax.set_title('Scores by group and their beverage choices')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I just realized that the example has been semantically weird already before. The stacked bar suggests that the quantity is summed up from both subgroups, and the errorbar indicates that within each subgroup the quantity is averaged. I cannot come up with a reasonable quantity for "Scores" that would actually work this way.

Second, before there were groups and inside these groups we distinguished by gender. This is something everybody is familiar with. Splitting a group up by beverage choice and scoring these subgroups is possible but an even more weird experiment.

I think we have two choices:
a) Come up with something completely new
b) Or accept that the plot is not semantically meaningful, merge and do something a) later.

@story645 what do you think?

@story645 story645 Aug 26, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ugh, I want to be okay with merging something that's not semantically meaningful 'cause @SourajitaDewasi worked so much on this, but I hear you that the semantics being off might be a distraction that will make the example harder to follow.
Keeping it simple, maybe change the underlying pivot table to

(caffeinated, tea), (decaffeinated, tea), (caffeinated, coffee), (decaffeinated, coffee) and the y axis is like #avg drink rating (1-5) so the example is basically a made up rating of what type of drink folks prefer.

ETA: cup height probably works just as well, or average amount drunk or the like.

Alternatively, palmer penguins is being used a lot to illustrate aggregated visualizations, and we can probably keep this example pretty small if what we store in the example is the pivot table made from it https://allisonhorst.github.io/palmerpenguins/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would be fine with merging as-is as an improvement, with the suggestion below, and have a follow up either a) removing the example, or b) reworking it to include penguins or other good ideas.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, let's take this as is (suggestion below committed) so that we can git this in 3.6. And let's think about how we can further improve later.

Comment thread examples/units/bar_unit_demo.py Resolved
@timhoffm
timhoffm merged commit 8956269 into matplotlib:main Aug 27, 2022
@timhoffm

Copy link
Copy Markdown
Member

@SourajitaDewasi thanks and congratulations on your first contribution to Matplotlib! 🎉

We hope to see you again.

@SourajitaDewasi

Copy link
Copy Markdown
Contributor Author

Thank you so much. This was my first contribution ever and this made me more eager to do better in OpenSource. I really look forward to working and contributing more in Matplotlib :)

Thank you once again!!!

@QuLogic QuLogic added this to the v3.7.0 milestone Sep 22, 2022
melissawm pushed a commit to melissawm/matplotlib that referenced this pull request Dec 19, 2022
* changing bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing stacked bar examples to tea and coffee

* changing bar unit from men and women to coffee and tea cup size

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar unit from men and women to coffee and tea cup size

* Update examples/units/bar_unit_demo.py

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
* changing bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing stacked bar examples to tea and coffee

* changing bar unit from men and women to coffee and tea cup size

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar unit from men and women to coffee and tea cup size

* Update examples/units/bar_unit_demo.py

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
* changing bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing stacked bar examples to tea and coffee

* changing barchart examples to tea and coffee

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to bream_fish length and parkki_fish length

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing bar unit examples from men and women to coffee and tea cup size

* changing stacked bar examples to tea and coffee

* changing bar unit from men and women to coffee and tea cup size

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar label examples from men and women to coffee and tea

* changing bar unit from men and women to coffee and tea cup size

* Update examples/units/bar_unit_demo.py

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants