Are you asking how to rotate the entire axes (and not just the text)?
If so, yes, it's possible, but you have to know the extents of the plot beforehand.
You'll have to use axisartist
, which allows more complex relationships like this, but is a bit more complex and not meant for interactive visualization. If you try to zoom, etc, you'll run into problems.
import matplotlib.pyplot as plt
from matplotlib.transforms import Affine2D
import mpl_toolkits.axisartist.floating_axes as floating_axes
fig = plt.figure()
plot_extents = 0, 10, 0, 10
transform = Affine2D().rotate_deg(45)
helper = floating_axes.GridHelperCurveLinear(transform, plot_extents)
ax = floating_axes.FloatingSubplot(fig, 111, grid_helper=helper)
fig.add_subplot(ax)
plt.show()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…