We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I often find myself writing a construction like this:
ax.set_xticklabels([x.get_text() for x in ax.get_xticklabels()],rotation=90)
This just looks ugly and it feels to me like this should have the same effect:
ax.set_xticklabels(rotation=90)
which would just require handling labels=None and defaulting to the current labels.
labels=None
Or is there already a more idiomatic way to do this that I'm missing?
The text was updated successfully, but these errors were encountered:
plt.setp(ax.xaxis.get_majorticklabels(), rotation=90) is probably more idiomatic?.. Definitely shorter.
plt.setp(ax.xaxis.get_majorticklabels(), rotation=90)
Sorry, something went wrong.
The Axis objects should probably be updated to include rotation as a valid tick parameter.
Axis
I think this will require updating mpl.axis._translate_tick_kw to allow rotation as a key + a test + a whats_new entry.
mpl.axis._translate_tick_kw
With those changes I think you will be able to do
ax.xaxis.set_tick_params(which='both', rotation=90)
set_tick_params
implemented by #6829
No branches or pull requests
I often find myself writing a construction like this:
ax.set_xticklabels([x.get_text() for x in ax.get_xticklabels()],rotation=90)
This just looks ugly and it feels to me like this should have the same effect:
ax.set_xticklabels(rotation=90)
which would just require handling
labels=None
and defaulting to the current labels.Or is there already a more idiomatic way to do this that I'm missing?
The text was updated successfully, but these errors were encountered: