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

Skip to content

Commit f1812c1

Browse files
committed
fix flake8
1 parent 3f741a1 commit f1812c1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

examples/style_sheets/style_sheets_reference.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ def plot_colored_circles(ax, prng, nb_samples=15):
6666
for sty_dict, j in zip(plt.rcParams['axes.prop_cycle'], range(nb_samples)):
6767
ax.add_patch(plt.Circle(prng.normal(scale=3, size=2),
6868
radius=1.0, color=sty_dict['color']))
69-
7069
ax.grid(visible=True)
7170
# Add annotation for enabling grid
7271
ax.annotate('ax.grid(True)', xy=(1, 1),
7372
xytext=(5, 8),
7473
va="top", ha="right",
7574
)
76-
7775
# Force the limits to be the same across the styles (because different
7876
# styles may have different numbers of available colors).
7977
ax.set_xlim([-4, 8])
@@ -100,6 +98,7 @@ def plot_histograms(ax, prng, nb_samples=10000):
10098
values = prng.beta(a, b, size=nb_samples)
10199
ax.hist(values, histtype="stepfilled", bins=30,
102100
alpha=0.8, density=True)
101+
103102
# Add a small annotation.
104103
ax.annotate('Annotation', xy=(0.25, 4.25),
105104
xytext=(0.9, 0.9), textcoords=ax.transAxes,
@@ -140,14 +139,10 @@ def plot_figure(style_label=""):
140139
plot_colored_circles(axs[5], prng)
141140

142141
# 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')
150144

145+
axs[4].add_artist(rec)
151146

152147
if __name__ == "__main__":
153148

0 commit comments

Comments
 (0)