boxoff#
- boxoff(ax=None, which=None, removeticks=True)[source]#
Removes the top and right borders (“spines”) of a plot.
Also optionally removes the tick marks, and flips the remaining ones outside. Can be used as an alias to
pl.axis('off')
ifwhich='all'
.- Parameters:
ax (Axes) – the axes to remove the spines from (if None, use current)
which (str/list) – a list or comma-separated string of spines: ‘top’, ‘bottom’, ‘left’, ‘right’, or ‘all’ (default top & right)
removeticks (bool) – whether to also remove the ticks from these spines
flipticks (bool) – whether to flip remaining ticks out
Examples:
pl.figure() pl.plot([2,5,3]) sc.boxoff() fig, ax = pl.subplots() pl.plot([1,4,1,4]) sc.boxoff(ax=ax, which='all') fig = pl.figure() pl.scatter(np.arange(100), pl.rand(100)) sc.boxoff('top, bottom')
New in version 1.3.3: ability to turn off multiple spines; removed “flipticks” arguments