image_output_1.png
import matplotlib.pyplot as plt

# create blank figure

fig, ax = plt.subplots()
plt.show()

# resize figure

fig, ax = plt.subplots(figsize=(10,10))
plt.show()

# set axis with xlim and ylim, title, labels

fig,ax = plt.subplots()

ax.set(xlim=[0.5, 4.5], ylim=[-2, 8], 
       title='An Example Axes',
       ylabel='Y-Axis', xlabel='X-Axis')

plt.show()

# create multiple subplots along rows

fig, ax = plt.subplots(nrows=2)

# create multiple subplots along columns

fig, ax = plt.subplots(ncols=2)

fig, ax = plt.subplots(nrows=2, ncols=2)
plt.show()