Skip to content

Commit

Permalink
... to >>>
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Nov 20, 2023
1 parent db80dd1 commit 6215dc9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions papyri/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 6215dc9

Please sign in to comment.