Skip to content
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

Implement support for hiding ticks labels from a stylesheet and/or "rcParams". #11543

Closed
KelSolaar opened this issue Jul 1, 2018 · 6 comments

Comments

@KelSolaar
Copy link
Contributor

KelSolaar commented Jul 1, 2018

Feature request

Feature summary

I would like to be able to hide ticks labels directly from a stylesheet and/or rcParams which does not seem to be currently possible. One can hide ticks as follows:

Code for reproduction

with plt.style.context({'xtick.bottom': False, 'ytick.left': False}):
    plt.plot(1, 1)
    plt.show()

but it is not possible to hide the ticks labels thus attributes like so would be a welcome addition:

  • 'xtick.top.labels'
  • 'xtick.bottom.labels'
  • 'ytick.left.labels'
  • 'ytick.right.labels'

Matplotlib version

  • Operating system: macOs 10.12.6
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): module://backend_interagg
  • Python version: Python 2.7.14
@QuLogic
Copy link
Member

QuLogic commented Jul 1, 2018

Is that not xtick.labelbottom, xtick.labeltop, ytick.labelleft, and ytick.labelright?

@KelSolaar
Copy link
Contributor Author

Hi @QuLogic,

I will try straight away although I don't see those in the big classic stylesheet: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Is there a way to find the full documented list of rcParams?

@KelSolaar
Copy link
Contributor Author

Confirming it works, thanks!

@QuLogic
Copy link
Member

QuLogic commented Jul 1, 2018

The classic style is there to replicate pre-2.0 style; it shouldn't be taken as a complete listing of rcParams. You can look at the template which should be more comprehensive: https://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template

Closing, as there is nothing to do here.

@QuLogic QuLogic closed this as completed Jul 1, 2018
@KelSolaar
Copy link
Contributor Author

Awesome thanks!

@jklymak
Copy link
Member

jklymak commented Jul 1, 2018

... or

defaultParams = {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants