From 6215dc995b0e7218264f25aea6677f76d3b08b9f Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier <bussonniermatthias@gmail.com> Date: Mon, 20 Nov 2023 15:02:56 +0100 Subject: [PATCH] ... to >>> --- papyri/examples.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/papyri/examples.py b/papyri/examples.py index b3437e96..d39fd816 100644 --- a/papyri/examples.py +++ b/papyri/examples.py @@ -107,13 +107,13 @@ def example1( Examples -------- >>> import matplotlib.pyplot as plt - ... fig, ax = plt.subplots() - ... ax.plot(range(10)) + >>> fig, ax = plt.subplots() + >>> ax.plot(range(10)) And now >>> ax.plot(range(5, 15)) - ... plt.show() + >>> plt.show() """ return "ok" @@ -124,24 +124,24 @@ def example2(): Examples -------- >>> import numpy as np - ... import matplotlib.pyplot as plt - ... from scipy.interpolate import UnivariateSpline + >>> import matplotlib.pyplot as plt + >>> from scipy.interpolate import UnivariateSpline >>> x = np.linspace(-3, 3, 50) - ... y = np.exp(-(x ** 2)) + 0.1 * np.random.randn(50) - ... plt.plot(x, y, "ro", ms=5) + >>> y = np.exp(-(x ** 2)) + 0.1 * np.random.randn(50) + >>> plt.plot(x, y, "ro", ms=5) Use the default value for the smoothing parameter: >>> spl = UnivariateSpline(x, y) - ... xs = np.linspace(-3, 3, 1000) - ... plt.plot(xs, spl(xs), "g", lw=3) + >>> xs = np.linspace(-3, 3, 1000) + >>> plt.plot(xs, spl(xs), "g", lw=3) Manually change the amount of smoothing: >>> spl.set_smoothing_factor(0.5) - ... plt.plot(xs, spl(xs), "b", lw=3) - ... plt.show() + >>> plt.plot(xs, spl(xs), "b", lw=3) + >>> plt.show() """ pass