Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

DOC: (subjectively) nicer annotated barchart example#9907

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

Merged

Conversation

afvincent
Copy link
Contributor

@afvincentafvincent commentedDec 1, 2017
edited
Loading

PR Summary

Here is a PR that:

  1. add the possibility in the demonstrated helper function for choosing a specific side where to put the text annotation to avoid overlapping ot the latter with the errorbar. For sure the logic could be made more robust or generic, but I tried to keep it minimal and yet sufficient to get something that I find significantly less terrible than before.
  2. tries to make both case a bit more symmetric from the code point of view between the women and the men cases (ind - width/2 andind + width/2 instead ofind andind + width, etc.)
  3. changes the colors: I agree that it is highly subjective but I find the previous ones quite “old fashion” (but maybe that they were chosen to be gender neutral or another peculiar reason).

I am open to revert part or all of 2. and 3. due to their subjective nature. However, I really think that 1. would help to make this example more attractive for people looking for a way to “simply” annotate bar charts (which seems rather frequent by wandering on the Internet) that is still quite pleasant to the eye.

Original
vanilla

Suggestion
tweaked

PR Checklist

  • Code is PEP 8 compliant
  • Documentation is sphinx and numpydoc compliant <- well, hopefully it is.

@afvincentafvincent added this to thev2.2 milestoneDec 1, 2017
@jklymakjklymak merged commitdbe0502 intomatplotlib:masterDec 1, 2017
@jklymak
Copy link
Member

I've merged because I would be very surpised if anyone thought this version was not an improvement over the last! Thanks!

@afvincent
Copy link
ContributorAuthor

@jklymak Well sometimes there is a reasonable argument about not changing some of the aesthetic part of the code as it is usually a matter of taste and could lead to a pile of small value commits (IIUC).

And I know that some other devs lean more toward the idea that one example should focus one feature and minimize cosmetick tweaks, in order to make the message clearer. I kind of agree with the general idea but sometimes it leads to quite unpleasant plots on purely aesthetic grounds (due to the historical defaults usually), which I also find sad as those example are often one of the main sources of ideas for end-users.

@jklymak
Copy link
Member

Sure, and if your code did a bunch of obfuscated or wacky things, I wouldn't have merged it (though I was probably bad to not allow PEP8 to finish - ahem).

@afvincent
Copy link
ContributorAuthor

FWIW, I checked it locally withpycodestyle IIRC ^^.

@QuLogicQuLogic modified the milestones:needs sorting,v2.2.0Feb 12, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

3 participants
@afvincent@jklymak@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp