Spans#
Vspans#
Use the Vspans
tool to add vertical spans to a plot.
[1]:
%matplotlib widget
import matplotlib.pyplot as plt
import mpltoolbox as tbx
plt.ioff()
[1]:
<contextlib.ExitStack at 0x7f95e8affdc0>
[2]:
fig, ax = plt.subplots(dpi=96)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
vspans = tbx.Vspans(ax=ax)
[4]:
fig.canvas
[4]:
Controls
Left-click and hold to make new vertical span
Right-click and hold to drag/move span
Middle-click (or Ctrl + left-click) to delete span
Hspans#
Use the Hspans
tool to add horizontal spans to a plot.
[5]:
fig, ax = plt.subplots(dpi=96)
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
hspans = tbx.Hspans(ax=ax)
[7]:
fig.canvas
[7]:
Controls
Left-click and hold to make new horizontal span
Right-click and hold to drag/move span
Middle-click (or Ctrl + left-click) to delete span