@@ -66,14 +66,12 @@ def plot_colored_circles(ax, prng, nb_samples=15):
66
66
for sty_dict , j in zip (plt .rcParams ['axes.prop_cycle' ], range (nb_samples )):
67
67
ax .add_patch (plt .Circle (prng .normal (scale = 3 , size = 2 ),
68
68
radius = 1.0 , color = sty_dict ['color' ]))
69
-
70
69
ax .grid (visible = True )
71
70
# Add annotation for enabling grid
72
71
ax .annotate ('ax.grid(True)' , xy = (1 , 1 ),
73
72
xytext = (5 , 8 ),
74
73
va = "top" , ha = "right" ,
75
74
)
76
-
77
75
# Force the limits to be the same across the styles (because different
78
76
# styles may have different numbers of available colors).
79
77
ax .set_xlim ([- 4 , 8 ])
@@ -100,6 +98,7 @@ def plot_histograms(ax, prng, nb_samples=10000):
100
98
values = prng .beta (a , b , size = nb_samples )
101
99
ax .hist (values , histtype = "stepfilled" , bins = 30 ,
102
100
alpha = 0.8 , density = True )
101
+
103
102
# Add a small annotation.
104
103
ax .annotate ('Annotation' , xy = (0.25 , 4.25 ),
105
104
xytext = (0.9 , 0.9 ), textcoords = ax .transAxes ,
@@ -140,14 +139,10 @@ def plot_figure(style_label=""):
140
139
plot_colored_circles (axs [5 ], prng )
141
140
142
141
# add divider
143
- rec = Rectangle (
144
- (1 + 0.025 , - 2 ),
145
- 0.05 , 16 ,
146
- clip_on = False ,
147
- color = 'gray' )
148
-
149
- axs [4 ].add_artist (rec )
142
+ rec = Rectangle ((1 + 0.025 , - 2 ), 0.05 , 16 ,
143
+ clip_on = False , color = 'gray' )
150
144
145
+ axs [4 ].add_artist (rec )
151
146
152
147
if __name__ == "__main__" :
153
148
0 commit comments