| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I think if we're gonna go for this, then one of the major reasons would be to provide examples of creating the groupings/stackings using loops 'cause I know that's a common question and I think would help these examples feel more general. |
Sorry, something went wrong.
|
Sure thing did you want to pick an example to do it for? Using the penguin dataset you can't really extract that many groups (from what I can think of... maybe you can). Unless we want to regress back to one of the original plots and refactor it to use a loop? (is there any best practise way we generate the groups using loops that I can have a look as well or is it up to me to write it) |
Sorry, something went wrong.
|
I think looping over your list is fine? for i, penguin_means in enumerate([adelie, gentoo, chinstrap]): |
Sorry, something went wrong.
There was a problem hiding this comment.
I like the bar label demo 👍.
I'm less convinced on the data of the other two plots because they contain a lot of missing data. I think we do not need to show missing data here - full datasets is the standard case and thus a bit simpler. It would also be ok to have one missing data point, but I feel that there is too much missing data for a simple example.
Sorry, something went wrong.
|
Thanks 👍🏻👍🏻 As for the other examples, I agree there are too many missing data points and it does clutter example. I'm unsure on how to wrangle the actual dataset to make it "clean" for these particular graphs. That's the best I could do for the penguin dataset. We could augment the data and just add some dummy values in and make a comment to say "hey this isn't all real data anymore". Or we could just revert those examples back to the previous graphs and I can refactor those to use for loops. I guess the question is what's more important for these examples; to demonstrate generalities (using loops) or to make the underlying data less arbitrary (in which case I'd try to work with the penguin dataset again). Let me know 🤔 |
Sorry, something went wrong.
Sorry, something went wrong.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
|
Thanks for the clarification @story645. Sure I understand, I won't modify the penguin data. I like your idea and thank you for the drawn out graph viz! I get what your trying to do but I don't think I get it enough to implement it into these examples right now. I guess from me what are the next steps. I can continue and play around the with penguin dataset and try to make it more "complete", or leave it and let you try work your idea into these graphs. Just let me know 👍🏻 |
Sorry, something went wrong.
There was a problem hiding this comment.
try to make it more general (no if statements in the loops) and lets see if that cleans up the other two examples?
Sorry, something went wrong.
…hange booleans and labels)
Sorry, something went wrong.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
There was a problem hiding this comment.
Needs to iterate over the dict to work, also please fix the syntax errors https://output.circle-artifacts.com/output/job/10abe8b2-316b-497e-a226-f7f579823536/artifacts/0/doc/build/html/gallery/index.html
Sorry, something went wrong.
|
@story645 should be good to go |
Sorry, something went wrong.
There was a problem hiding this comment.
I think it's good to go except for the space before the plt.subplots() call - the other suggestions are more personal preferences.
I'll merge tomorrow if there are no other comments.
Sorry, something went wrong.
| # Stacked bar plot with error bars | ||
|
|
||
| fig, ax = plt.subplots() | ||
| bottom = np.zeros(3) |
There was a problem hiding this comment.
| bottom = np.zeros(3) | |
| bottom = np.zeros(len(species)) |
if you want to be even more generalt
Sorry, something went wrong.
| ax.set_title('Scores by group and their beverage choices') | ||
| ax.set_xticks(ind, labels=['G1', 'G2', 'G3', 'G4', 'G5']) | ||
| ax.legend() | ||
| ax.bar_label(p, label_type='center') |
There was a problem hiding this comment.
is white or a gray easier to read?
Sorry, something went wrong.
| width = 0.5 | ||
|
|
||
| fig, ax = plt.subplots() | ||
| bottom = np.zeros(3) |
There was a problem hiding this comment.
same as above for generalization
Sorry, something went wrong.
Co-authored-by: hannah <story645@gmail.com>
|
This has to be rebased/squashed - do you want to do it or should I? |
Sorry, something went wrong.
|
Happy for you to do it, thanks! |
Sorry, something went wrong.
|
Thanks for your persistence @kostyafarber ! |
Sorry, something went wrong.
|
Glad I could help! |
Sorry, something went wrong.
refactor category bar chart examples to use loops and penguin data
refactor category bar chart examples to use loops and penguin data
refactor category bar chart examples to use loops and penguin data
refactor category bar chart examples to use loops and penguin data
| Back | FazBrowse Home | New Git URL |
PR Summary
The purpose of this PR is to update the multiple category bar chart examples in the documentation; so they are more simple and use non-arbitrary data (penguin dataset). This helps address the problem discussed in #23465 in which the examples were not semantically meaningful.
The examples have also been refactored using loops, to demonstrate general use cases, also in #23465.
PR Checklist
Documentation and Tests
Release Notes