From 93d208d7e49f82292415cdd479f1b96746a3f7f2 Mon Sep 17 00:00:00 2001 From: mariamalykh Date: Fri, 19 May 2023 12:19:47 +0000 Subject: [PATCH] replaced step with stairs in basic plot types Co-authored-by: Maria Malykh --- galleries/plot_types/basic/{step.py => stairs.py} | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename galleries/plot_types/basic/{step.py => stairs.py} (70%) 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))