Skip to content

Fix default label visibility for top-or-left-labeled shared subplots(). #19472

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
Feb 18, 2021

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 7, 2021

On the following example

from pylab import *
rcParams.update({"xtick.labeltop": 1, "xtick.labelbottom": 0,
                 "ytick.labelright": 1, "ytick.labelleft": 0})
subplots(3, 3, sharex=True, sharey=True)

subplots() now correctly leaves the xlabels on the first row and the
ylabels on the last column, rather than the other way round.

old:
old1
new:
new1

On the following example

from pylab import *
rcParams.update({"xtick.labeltop": 1, "xtick.labelbottom": 1,
                 "ytick.labelright": 1, "ytick.labelleft": 1})
subplots(3, 3, sharex=True, sharey=True)
show()

subplots() now correctly leaves the xlabels on the first and last row
and the ylabels on the first and last column.

old:
old2
new:
new2

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@anntzer anntzer force-pushed the sharedlabels branch 2 times, most recently from ef3f42d to 78cbe1c Compare February 7, 2021 15:07
@tacaswell tacaswell added this to the v3.4.0 milestone Feb 18, 2021
@jklymak
Copy link
Member

jklymak commented Feb 18, 2021

Does this need a what's new in case someone had a whole song and dance to replicate this, and they can now remove it?

On the following example
```python
from pylab import *
rcParams.update({"xtick.labeltop": 1, "xtick.labelbottom": 0,
                 "ytick.labelright": 1, "ytick.labelleft": 0})
subplots(3, 3, sharex=True, sharey=True)
```
subplots() now correctly leaves the xlabels on the first row and the
ylabels on the last column, rather than the other way round.

On the following example
```python
from pylab import *
rcParams.update({"xtick.labeltop": 1, "xtick.labelbottom": 1,
                 "ytick.labelright": 1, "ytick.labelleft": 1})
subplots(3, 3, sharex=True, sharey=True)
show()
```
subplots() now correctly leaves the xlabels on the first and last row
and the ylabels on the first and last column.
@anntzer
Copy link
Contributor Author

anntzer commented Feb 18, 2021

done

@jklymak
Copy link
Member

jklymak commented Feb 18, 2021

Anyone can merge post-CI

@QuLogic QuLogic merged commit b681abc into matplotlib:master Feb 18, 2021
@anntzer anntzer deleted the sharedlabels branch February 18, 2021 22:51
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