diff --git a/galleries/plot_types/basic/step.py b/galleries/plot_types/basic/stairs.py similarity index 70% rename from galleries/plot_types/basic/step.py rename to galleries/plot_types/basic/stairs.py index 6044262e6d1f..e8ca455c0e2f 100644 --- a/galleries/plot_types/basic/step.py +++ b/galleries/plot_types/basic/stairs.py @@ -1,9 +1,9 @@ """ -========== -step(x, y) -========== +============== +stairs(values) +============== -See `~matplotlib.axes.Axes.step`. +See `~matplotlib.axes.Axes.stairs`. """ import matplotlib.pyplot as plt import numpy as np @@ -11,13 +11,12 @@ plt.style.use('_mpl-gallery') # make data -x = 0.5 + np.arange(8) y = [4.8, 5.5, 3.5, 4.6, 6.5, 6.6, 2.6, 3.0] # plot fig, ax = plt.subplots() -ax.step(x, y, linewidth=2.5) +ax.stairs(y, linewidth=2.5) ax.set(xlim=(0, 8), xticks=np.arange(1, 8), ylim=(0, 8), yticks=np.arange(1, 8))