Skip to content

tick rotation with axes_grid1.host_subplot not working #6830

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
ocehugo opened this issue Jul 26, 2016 · 4 comments
Closed

tick rotation with axes_grid1.host_subplot not working #6830

ocehugo opened this issue Jul 26, 2016 · 4 comments
Labels
Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. status: inactive Marked by the “Stale” Github Action topic: mpl_toolkit

Comments

@ocehugo
Copy link

ocehugo commented Jul 26, 2016

To help us understand and resolve your issue please check that you have provided
the information below.

  • [1.5.1,3.5.1,OSX ] Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)
  • [pip ] How did you install Matplotlib and Python (pip, anaconda, from source ...)

When using host_subplot output as axis objects to create new spines/axes, the tick rotation changes are not executed in the plot. I assume that several other tick operations are also not being executed.

I noted this when adding several new spines/axes following http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html.

Rotation is not done even in the most basic case below :

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import numpy as np

host = host_subplot(111,axes_class=AA.Axes)
plt.subplots_adjust(bottom=0.15)
host.plot(10,10)
host.set_xticks([10.2,10.4,10.6])
host.set_xticklabels(['A','B','C'],rotation=45)

In the figure above A,B,C ends up not rotated.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Aug 13, 2016
@tacaswell tacaswell added the Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues label Aug 13, 2016
@tacaswell
Copy link
Member

This is hopefully due to something in axisartist / axes_grid snarfing a kwarg. My intuition is that the fix will be easy but finding it might be tricky 😜 .

c3liujia pushed a commit to c3liujia/matplotlib that referenced this issue Apr 12, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@timlod
Copy link

timlod commented Jul 26, 2020

This is still (or again?) the case in 3.3.0.

To reproduce, run https://matplotlib.org/3.3.0/gallery/axisartist/demo_parasite_axes2.html and use plt.xticks(rotation=45) to attempt ticklabel rotation.

@oscargus
Copy link
Member

Spent some time digging into this without any solution, but thought it was worth writing down that the Text objects obtained from get_xticklabels do have the correct rotation.

Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Nov 27, 2023
@github-actions github-actions bot added the status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. label Dec 28, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. status: inactive Marked by the “Stale” Github Action topic: mpl_toolkit
Projects
None yet
Development

No branches or pull requests

5 participants