Skip to content

Instantly share code, notes, and snippets.

@joferkington
Created February 9, 2015 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joferkington/6789f086769527cc3157 to your computer and use it in GitHub Desktop.
Save joferkington/6789f086769527cc3157 to your computer and use it in GitHub Desktop.
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)
# Hide the ticks and background
ax.patch.set(visible=False)
for axis in ax.axis.values():
# If you'd like to hide the borders, use "axis.line.set(visible=False)"
axis.major_ticks.set(visible=False)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment