Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX label vertical alignment can now be specified #7970

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

FIX label vertical alignment can now be specified #7970

wants to merge 2 commits into from

Conversation

NelleV
Copy link
Member

@NelleV NelleV commented Jan 28, 2017

This patch adds a new rcParams allowing to set label vertical alignment. The
sole reason for the existance of this new parameter is to allow user to reset
the style to before 2.0 for testing purposes.

This patch provides a fix to a very pick backward compatibility break. Unfortunately, the
patch that introduces this break also regenerated the test images. This leads to the introduction of a private _test_class stylesheet, corresponding to our current test suite, and a classic stylesheet which is backward compatible.

refs #7905

TODO

  • Document this new parameter

@NelleV NelleV added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jan 28, 2017
@NelleV NelleV added this to the 2.0.1 (next bug fix release) milestone Jan 28, 2017
@@ -18,6 +18,12 @@ values is a single line of python
See :ref:`customizing-with-matplotlibrc-files` for details about how to
persistently and selectively revert many of these changes.

.. note::
Copy link
Member

Choose a reason for hiding this comment

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

I would give this a 'YTick alignment' section in the 'Tick Label Formatting' section. We don't have completely throw our selves under the bus in the first section. I don't think this needs to be called out in a note, merging it into the paragraph above would be enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 on the name and section. Finding a better name was on my todo list.

This patch adds a new rcParams allowing to set label vertical alignment. The
sole reason for the existance of this new parameter is to allow user to reset
the style to before 2.0 for testing purposes.

closes #7905
This allows the public classic stylesheet to be 'more' backward compatible
@NelleV NelleV changed the title [WIP] FIX label vertical alignment can now be specified [MRG] FIX label vertical alignment can now be specified Jan 28, 2017
@NelleV
Copy link
Member Author

NelleV commented Jan 28, 2017

attn @matplotlib/developers
This patch introduces a new "private" stylesheet called _classic_test. The "classic" stylesheet can now be 'more' backward compatible without breaking our test suite.

@anntzer
Copy link
Contributor

anntzer commented Jan 28, 2017

What is the argument for adding yet another private rcparam (which the codebase will have to keepa round for a while) rather than regenerating the test suite images (which is a one shot thing)?

@NelleV
Copy link
Member Author

NelleV commented Jan 28, 2017

@anntzer It is not private. It is actually used in the classic stylesheet. It is for backward compatibility.
See #refs #7905

@anntzer
Copy link
Contributor

anntzer commented Jan 28, 2017

Ah, I see, sorry for the noise.
Still, could we just not add the "_classic_test" style and regenerate the test images with the new "ytick.alignment: center" rcparam?

@NelleV
Copy link
Member Author

NelleV commented Jan 28, 2017

It's around 350 images to regenerate. It's makes the git repository grow massively :(

I'll let @tacaswell give the final word on this.

@WeatherGod
Copy link
Member

For consistency's sake, we should also have an xtick version of this parameter.

I am disappointed that we seemed to have updated our baseline images, thereby causing this discrepancy between our classic style used by our tests and the classic style used by our users, but I agree that it would be much more harmful to regenerate these images for such a tiny change. We run the risk of a more serious error during the regeneration process.

@tacaswell
Copy link
Member

I am still in favor of the extra style sheet and 👍 on doing x as well.

@QuLogic
Copy link
Member

QuLogic commented Feb 6, 2017

With the pytest migration, it would be simpler if you rebased on and targetted v2.0.x directly, then resolving the conflict upwards would be less work. Could you do so and add the 'x' version that @tacaswell requested?

@NelleV
Copy link
Member Author

NelleV commented Feb 15, 2017

This patch is going to be a mess to apply both on master and v2.0.x
I suspect we may have to create two pull requests.

@NelleV
Copy link
Member Author

NelleV commented Feb 15, 2017

I am closing this in favor of #8081 : same patch, targetting v2.0.x.

@NelleV NelleV closed this Feb 15, 2017
@QuLogic QuLogic changed the title [MRG] FIX label vertical alignment can now be specified FIX label vertical alignment can now be specified Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: duplicate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants