Matplotlib, by default, displays all four spines at the top, bottom, left and right of the plot, creating a boundary box around it. It displays ticks and ticklabels only on the left (y axis) and the bottom (x axis). However, it allows us to customize their placement and also omit any of the spines, as required.
Customizing spines
Getting ready
We will plot six graphs with the same data, but setting various options for spines.
Import the following required libraries:
import numpy as np
import matplotlib.pyplot as plt
How to do it...
The following code block displays six...