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

Skip to content

Make _classic_test style a tiny patch on top of classic. #14942

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

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jul 31, 2019

This makes it easier to see the difference between the two styles.

See also #8081 which introduced _classic_test.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic
Copy link
Member

QuLogic commented Aug 1, 2019

It seems like there's more in the diff than just ytick.alignment?

--- classic.mplstyle	2019-07-16 20:41:48.743238831 -0400
+++ _classic_test.mplstyle	2019-07-31 02:57:47.044369917 -0400
@@ -8,8 +8,6 @@
 lines.linestyle   : -       # solid line
 lines.color       : b       # has no affect on plot(); see axes.prop_cycle
 lines.marker      : None    # the default marker
-lines.markerfacecolor  : auto    # the default markerfacecolor
-lines.markeredgecolor  : auto    # the default markeredgecolor
 lines.markeredgewidth  : 0.5     # the line width around the marker symbol
 lines.markersize  : 6            # markersize, in points
 lines.dash_joinstyle : round        # miter|round|bevel
@@ -247,7 +245,6 @@
 xtick.major.bottom   : True   # draw x axis bottom major ticks
 xtick.minor.top      : True   # draw x axis top minor ticks
 xtick.minor.bottom   : True   # draw x axis bottom minor ticks
-xtick.alignment : center
 
 ytick.left           : True   # draw ticks on the left side
 ytick.right          : True   # draw ticks on the right side
@@ -265,7 +262,6 @@
 ytick.major.right    : True   # draw y axis right major ticks
 ytick.minor.left     : True   # draw y axis left minor ticks
 ytick.minor.right    : True   # draw y axis right minor ticks
-ytick.alignment      : center
 
 ### GRIDS
 grid.color       :   k       # grid color

@anntzer
Copy link
Contributor Author

anntzer commented Aug 1, 2019

these are still the default values
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/rcsetup.py#L975
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/rcsetup.py#L1254

right now _classic_test does not set them, so it uses the defaults from rcsetup; with this PR it will inherit them from classic, but the values are the same (and even if the defaults change, classic won't change so _classic_test/_test_patch will be unaffected.

@@ -0,0 +1,4 @@
# This patch should go on top of the "classic" style and exists solely to avoid
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 leave "classic" in the name. Maybe "_classic_test_patch.mplstyle". This makes it clear that it's only intended for the classic style.

style = ["classic", "_classic_test_patch"]

reads quite consistent.

"internal" is not adding much as we already have a underscore prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, renamed to _classic_test_patch

This makes it easier to see the difference between the two styles.
@tacaswell tacaswell added this to the v3.2.0 milestone Aug 8, 2019
@tacaswell tacaswell merged commit e86c9cd into matplotlib:master Aug 8, 2019
@anntzer anntzer deleted the classic_test branch August 8, 2019 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants