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

Fix scaling of RadioButtons#10780

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

Abdul-Miraj
Copy link
Contributor

@Abdul-MirajAbdul-Miraj commentedMar 14, 2018
edited
Loading

PR Summary

This fix scales the radio buttons correctly with the size of the legend by taking the height that is already calculated for each section of the legend, which is defined by the variable dy (line 984). I took the dy value and converted appropriately into a radius (by dividing the value by 2) and subtracting a very small unit to allow for some spacing for in between the buttons. I made it default back into the previously hard-coded value of 0.05 if the value of the radius is any bigger so in the case where there isn't many radio buttons, they wouldn't be huge. Previously the value of the RadioButtons were set to 0.05 thus when the space given for each radio button was less then the 0.05 unit the buttons would overlap onto eachother.

Note: The tests seem to be failing at the image comparison tests for the radio button. Not entirely sure why, the test pass locally on my own machine. Any insight would be helpful, thank you.

before

after

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant

@afvincent
Copy link
Contributor

Hum, about the failing image test comparison, I would suspect a Freetype issue as it is quite usual. See for example thissection in the documentation.

On top of that you could try to addremove_text=True to the image comparison decorator, to at least partly mitigate the issue with most of the fonts (the texts in the widgets are likely to stay visible, but the labels, tick labels and titles shoud be hidden IIRC). Being there, you could also addstyle='mpl20' to be more future-proof.

@Abdul-Miraj
Copy link
ContributorAuthor

Abdul-Miraj commentedMar 15, 2018
edited
Loading

I original thought I was using the correct Freetype, as I set my setup.cfg correctly but realized it wasn't actually using the version mlp wanted. I had to delete my build folder and recompile the project for it to use the correct version#6911. Thank you!

@br-Zhang
Copy link
Contributor

Based on the logs, it looks like CI is failing due to a PEP8 issue because of trailing whitespaces on line 93 of test_widgets.py.

Abdul-Miraj reacted with thumbs up emoji

@Abdul-Miraj
Copy link
ContributorAuthor

Abdul-Miraj commentedMar 15, 2018
edited
Loading

Oh.. I completely missed that. I assume they were just pep8 warnings that were just making me aware that they were there. Thank you@br-Zhang

@dstansbydstansby added this to thev3.0 milestoneApr 2, 2018
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.

👍 Thanks a lot for this fix!

@dstansbydstansby merged commitd9b5b4e intomatplotlib:masterApr 2, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

6 participants
@Abdul-Miraj@afvincent@br-Zhang@timhoffm@dstansby@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp