Skip to content

Commit 16f166b

Browse files
committed
black update
1 parent 0d5596b commit 16f166b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/test_legend_best_location.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ def plot():
1010
t = np.arange(0.0, 2.0 * np.pi, 0.4)
1111

1212
# Legend best location is "upper right"
13-
l, = axes[0].plot(t, np.cos(t) * np.exp(-t), linewidth=0.5)
13+
(l,) = axes[0].plot(t, np.cos(t) * np.exp(-t), linewidth=0.5)
1414
axes[0].legend((l,), ("UR",), loc=0)
1515

1616
# Legend best location is "upper left"
17-
l, = axes[1].plot(t, np.cos(t) * np.exp(0.15 * t), linewidth=0.5)
17+
(l,) = axes[1].plot(t, np.cos(t) * np.exp(0.15 * t), linewidth=0.5)
1818
axes[1].legend((l,), ("UL",), loc=0)
1919

2020
# Legend best location is "lower left"
21-
l, = axes[2].plot(t, np.cos(5.0 * t) + 1, linewidth=0.5)
21+
(l,) = axes[2].plot(t, np.cos(5.0 * t) + 1, linewidth=0.5)
2222
axes[2].legend((l,), ("LL",), loc=0)
2323

2424
# Legend best location is "lower right"
25-
l, = axes[3].plot(
25+
(l,) = axes[3].plot(
2626
t, 2 * np.cos(5.0 * t) * np.exp(-0.5 * t) + 0.2 * t, linewidth=0.5
2727
)
2828
axes[3].legend((l,), ("LR",), loc=0)
2929

3030
# Legend best location is "center left"
31-
l, = axes[4].plot(t[30:], 2 * np.cos(10 * t[30:]), linewidth=0.5)
31+
(l,) = axes[4].plot(t[30:], 2 * np.cos(10 * t[30:]), linewidth=0.5)
3232
axes[4].plot(t, -1.5 * np.ones_like(t), t, 1.5 * np.ones_like(t))
3333
axes[4].legend((l,), ("CL",), loc=0)
3434

3535
# Legend best location is "center right"
36-
l, = axes[5].plot(t[:30], 2 * np.cos(10 * t[:30]), linewidth=0.5)
36+
(l,) = axes[5].plot(t[:30], 2 * np.cos(10 * t[:30]), linewidth=0.5)
3737
axes[5].plot(t, -1.5 * np.ones_like(t), t, 1.5 * np.ones_like(t))
3838
axes[5].legend((l,), ("CR",), loc=0)
3939

4040
# Legend best location is "lower center"
41-
l, = axes[6].plot(t, -3 * np.cos(t) * np.exp(-0.1 * t), linewidth=0.5)
41+
(l,) = axes[6].plot(t, -3 * np.cos(t) * np.exp(-0.1 * t), linewidth=0.5)
4242
axes[6].legend((l,), ("LC",), loc=0)
4343

4444
# Legend best location is "upper center"
45-
l, = axes[7].plot(t, 3 * np.cos(t) * np.exp(-0.1 * t), linewidth=0.5)
45+
(l,) = axes[7].plot(t, 3 * np.cos(t) * np.exp(-0.1 * t), linewidth=0.5)
4646
axes[7].legend((l,), ("UC",), loc=0)
4747

4848
# Legend best location is "center"

test/test_legends2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def plot():
1414
# note that plot returns a list of lines. The 'l1, = plot' usage
1515
# extracts the first element of the list inot l1 using tuple unpacking.
1616
# So l1 is a Line2D instance, not a sequence of lines
17-
l1, = axes[k].plot(t2, np.exp(-t2), linewidth=0.5)
17+
(l1,) = axes[k].plot(t2, np.exp(-t2), linewidth=0.5)
1818
axes[k].plot(t2, np.sin(2 * np.pi * t2), "--go", t1, np.log(1 + t1), ".")
1919
axes[k].plot(t2, np.exp(-t2) * np.sin(2 * np.pi * t2), "rs-.")
2020

0 commit comments

Comments
 (0)