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

Use scalars below a certain exponent in labes of log-scales axis#6834

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

Closed
zblz wants to merge1 commit intomatplotlib:masterfromzblz:min-exponent

Conversation

zblz
Copy link
Member

This is a restart of#4730 with the added functionality of the configuration through rcParams. There is a new rcParam calledaxes.formatter.min_exponent that sets the minimum exponent that will be formatted as10^{x}. I have currently set the default to 0 to retain current behaviour of formatting everything as10^{x}, including10^{0}. A setting of 3 would reproduce the behaviour of@astrofrog's implementation in#4730.

The remaining problem is the baseline for labels on the x axis. Because of the lack of exponent, they are aligned quite a bit higher that the rest of the labels, see below.@mdboom: Any idea on how to fix this? Is there a way to pass a minimum height for the text box from the formatter?

labels

tacaswell reacted with thumbs up emoji
@QuLogic
Copy link
Member

This one really makes clear how the vertical alignment is wrong for text with superscripts as I've been saying on gitter.

@tacaswelltacaswell added this to the2.0 (style change major release) milestoneJul 28, 2016
@tacaswell
Copy link
Member

This is probably the same root cause as#6847

This was referencedAug 1, 2016
@zblz
Copy link
MemberAuthor

zblz commentedAug 4, 2016

@mdboom: Your fix for the x-axis aligment does indeed fix the issue here but also changes the aligmnent of labels in many other test images, and some of them look worse. Maybe we should review that in a different PR?

@QuLogic
Copy link
Member

QuLogic commentedAug 4, 2016
edited
Loading

I think regular text is now one pixel too low (in addition to exponents being too low already):
figure_1

@tacaswell
Copy link
Member

@zblz This needs a rebase

@zblz
Copy link
MemberAuthor

zblz commentedSep 2, 2016

The alignment fix by@mdboom introduces changes in many many labels on the test images. I'm not sure about many of them and think this should be discussed in a separate PR. I propose to split the alignment fix into its own PR so we can discuss it independently.

@efiring
Copy link
Member

This is a reasonable proposal provide an option that some will like, but I am not comfortable with the extra complexity it adds to handle the positioning. It sounds like a better way to to do that is via positioning labels by their baseline, as suggested somewhere that I can't find right now. I'm open to arguments either way.
I'm close to changing the milestone to 2.1, since this is really a new feature rather than a style change. As an intermediate step, I will use a label to make it clear this is not a blocker.

@efiring
Copy link
Member

See also#2015,#4115. It would certainly be nice to get all of this resolved clearly and cleanly.

@QuLogic
Copy link
Member

This needs a rebase and a review, so I don't think it's going into 2.0.

@QuLogicQuLogic modified the milestones:2.1 (next point release),2.0 (style change major release)Dec 7, 2016
@dstansby
Copy link
Member

This looks like a neat feature!@zblz could you rebase it on to the current master branch?

endolith reacted with thumbs up emoji

@zblz
Copy link
MemberAuthor

zblz commentedFeb 7, 2017

@dstansby - This is now rebased on master with tests updated for py.test.

@zblz
Copy link
MemberAuthor

zblz commentedFeb 7, 2017

Note that I have also removed the baseline fixing commit added by@mdboom. As mentioned above, it introduces a lot of changes in baseline images that I think should be discussed in a separate PR or issue such as#4115.

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

Looks good to me, just needs a what's new entry.

@NelleV
Copy link
Member

Closing in favor of#8322

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dstansbydstansbydstansby approved these changes

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

Successfully merging this pull request may close these issues.

7 participants
@zblz@QuLogic@tacaswell@efiring@dstansby@NelleV@mdboom

[8]ページ先頭

©2009-2025 Movatter.jp