How to rotate tick labels in floating cylindrical axes?
<p><a href="http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html" rel="nofollow">http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html</a></p>

<p>Check out the VERY bottom of this link. I'm interested in that axes in the middle, where the axis objects are curved into the shape of a quarter-washer. If you check the sourcecode, this axes object is made by setup_axes2:</p>

<pre><code>def setup_axes2(fig, rect):
"""
With custom locator and formatter.
Note that the extreme values are swapped.
"""
tr = PolarAxes.PolarTransform()

pi = np.pi
angle_ticks = [(0, r"$0$"),
           (.25*pi, r"$\frac{1}{4}\pi$"),
           (.5*pi, r"$\frac{1}{2}\pi$")]
grid_locator1 = FixedLocator([v for v, s in angle_ticks])
tick_formatter1 = DictFormatter(dict(angle_ticks))

grid_locator2 = MaxNLocator(2)

grid_helper = floating_axes.GridHelperCurveLinear(
    tr, extremes=(.5*pi, 0, 2, 1),
    grid_locator1=grid_locator1,
    grid_locator2=grid_locator2,
    tick_formatter1=tick_formatter1,
    tick_formatter2=None)

ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
fig.add_subplot(ax1)

# create a parasite axes whose transData in RA, cz
aux_ax = ax1.get_aux_axes(tr)

aux_ax.patch = ax1.patch  # for aux_ax to have a clip path as in ax
ax1.patch.zorder = 0.9  # but this has a side effect that the patch is
# drawn twice, and possibly over some other
# artists. So, we decrease the zorder a bit to
# prevent this.

return ax1, aux_ax
</code></pre>

<p>When I label the ticks in the theta axis, the labels are always upside down. I don't know how to flip them. I also don't know how to flip the axis labels upside down. Does anyone know about these confusing floating axes?</p>

<p>The hint was in <code>setup_axes3()</code> from the example you linked. The individual axes in the <code>FloatingSubplot</code> are referred to like <code>ax.axis[side]</code> where <code>side</code> is one of <code>["top","bottom","left","right"]</code>. From there you get the usual.</p>

<pre><code>ax = ax2.axis["bottom"]
ax.major_ticklabels.set_rotation(180)
ax.set_label("foo")
ax.label.set_rotation(180)
ax.LABELPAD += 10
</code></pre>

<p>Just do <code>dir(ax)</code> to see what you have access to.</p>

<p><a href="http://i.stack.imgur.com/S7dvL.png" rel="nofollow"><img src="http://i.stack.imgur.com/S7dvL.png" alt="enter image description here"></a></p>

python matplotlib plot