10
10
11
11
12
12
def plot_scatter (ax , prng , nb_samples = 100 ):
13
- """ Scatter plot.
13
+ """Scatter plot.
14
14
"""
15
15
for mu , sigma , marker in [(- .5 , 0.75 , 'o' ), (0.75 , 1. , 's' )]:
16
16
x , y = prng .normal (loc = mu , scale = sigma , size = (2 , nb_samples ))
@@ -21,7 +21,7 @@ def plot_scatter(ax, prng, nb_samples=100):
21
21
22
22
23
23
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.
25
25
"""
26
26
L = 2 * np .pi
27
27
x = np .linspace (0 , L )
@@ -34,7 +34,7 @@ def plot_colored_sinusoidal_lines(ax):
34
34
35
35
36
36
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 .
38
38
"""
39
39
x = np .arange (nb_samples )
40
40
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):
47
47
48
48
49
49
def plot_colored_circles (ax , prng , nb_samples = 15 ):
50
- """ Plots circle patches.
50
+ """Plot circle patches.
51
51
52
52
NB: draws a fixed amount of samples, rather than using the length of
53
53
the color cycle, because different styles may have different numbers
@@ -65,7 +65,7 @@ def plot_colored_circles(ax, prng, nb_samples=15):
65
65
66
66
67
67
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.
69
69
"""
70
70
values = prng .random_sample (size = size )
71
71
ax .imshow (values , interpolation = 'none' )
@@ -74,7 +74,7 @@ def plot_image_and_patch(ax, prng, size=(20, 20)):
74
74
75
75
76
76
def plot_histograms (ax , prng , nb_samples = 10000 ):
77
- """ Plots 4 histograms and a text annotation.
77
+ """Plot 4 histograms and a text annotation.
78
78
"""
79
79
params = ((10 , 10 ), (4 , 12 ), (50 , 12 ), (6 , 55 ))
80
80
for a , b in params :
@@ -93,8 +93,8 @@ def plot_histograms(ax, prng, nb_samples=10000):
93
93
94
94
95
95
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
+
98
98
If `style_label` is None, fall back to the `default` style.
99
99
"""
100
100
if style_label is None :
0 commit comments