Dropped spines#

Demo of spines offset from the axes (a.k.a. "dropped spines").

dropped spines
import matplotlib.pyplot as plt
import numpy as np

# Fixing random state for reproducibility

fig, ax = plt.subplots()

image = np.random.uniform(size=(10, 10))
ax.imshow(image, cmap=plt.cm.gray)
ax.set_title('dropped spines')

# Move left and bottom spines outward by 10 points
ax.spines[['left', 'bottom']].set_position(('outward', 10))
# Hide the right and top spines
ax.spines[['top', 'right']].set_visible(False)


Gallery generated by Sphinx-Gallery