Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 610ce04

Browse files
committed
Fix the docstrings to be more PEP257-compliant
1 parent ad10fbb commit 610ce04

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/style_sheets/style_sheets_reference.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def plot_scatter(ax, prng, nb_samples=100):
13-
""" Scatter plot.
13+
"""Scatter plot.
1414
"""
1515
for mu, sigma, marker in [(-.5, 0.75, 'o'), (0.75, 1., 's')]:
1616
x, y = prng.normal(loc=mu, scale=sigma, size=(2, nb_samples))
@@ -21,7 +21,7 @@ def plot_scatter(ax, prng, nb_samples=100):
2121

2222

2323
def plot_colored_sinusoidal_lines(ax):
24-
""" Plots sinusoidal lines with colors following the style color cycle.
24+
"""Plot sinusoidal lines with colors following the style color cycle.
2525
"""
2626
L = 2*np.pi
2727
x = np.linspace(0, L)
@@ -34,7 +34,7 @@ def plot_colored_sinusoidal_lines(ax):
3434

3535

3636
def plot_bar_graphs(ax, prng, min_value=5, max_value=25, nb_samples=5):
37-
""" Plots two bar graphs side by side, with letters as xticklabels.
37+
"""Plot two bar graphs side by side, with letters as x-tick labels.
3838
"""
3939
x = np.arange(nb_samples)
4040
ya, yb = prng.randint(min_value, max_value, size=(2, nb_samples))
@@ -47,7 +47,7 @@ def plot_bar_graphs(ax, prng, min_value=5, max_value=25, nb_samples=5):
4747

4848

4949
def plot_colored_circles(ax, prng, nb_samples=15):
50-
""" Plots circle patches.
50+
"""Plot circle patches.
5151
5252
NB: draws a fixed amount of samples, rather than using the length of
5353
the color cycle, because different styles may have different numbers
@@ -65,7 +65,7 @@ def plot_colored_circles(ax, prng, nb_samples=15):
6565

6666

6767
def plot_image_and_patch(ax, prng, size=(20, 20)):
68-
""" Plots an image with random values and superimposes a circular patch.
68+
"""Plot an image with random values and superimpose a circular patch.
6969
"""
7070
values = prng.random_sample(size=size)
7171
ax.imshow(values, interpolation='none')
@@ -74,7 +74,7 @@ def plot_image_and_patch(ax, prng, size=(20, 20)):
7474

7575

7676
def plot_histograms(ax, prng, nb_samples=10000):
77-
""" Plots 4 histograms and a text annotation.
77+
"""Plot 4 histograms and a text annotation.
7878
"""
7979
params = ((10, 10), (4, 12), (50, 12), (6, 55))
8080
for a, b in params:
@@ -93,8 +93,8 @@ def plot_histograms(ax, prng, nb_samples=10000):
9393

9494

9595
def plot_figure(style_label=None):
96-
"""
97-
Sets up and plots the demonstration figure with the style `style_label`.
96+
"""Setup and plot the demonstration figure with a given style.
97+
9898
If `style_label` is None, fall back to the `default` style.
9999
"""
100100
if style_label is None:

0 commit comments

Comments
 (0)