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

Skip to content

Commit 1c7bef2

Browse files
committed
use keyword arguments for setp() in examples
1 parent 37978a8 commit 1c7bef2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/lines_bars_and_markers/arctest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def f(t):
1818
t1 = np.arange(0.0, 5.0, .2)
1919

2020
l = plt.plot(t1, f(t1), 'ro')
21-
plt.setp(l, 'markersize', 30)
22-
plt.setp(l, 'markerfacecolor', 'C0')
21+
plt.setp(l, markersize=30)
22+
plt.setp(l, markerfacecolor='C0')
2323

2424
plt.show()

examples/lines_bars_and_markers/stem_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
x = np.linspace(0.1, 2 * np.pi, 10)
1212
markerline, stemlines, baseline = plt.stem(x, np.cos(x), '-.')
13-
plt.setp(baseline, 'color', 'r', 'linewidth', 2)
13+
plt.setp(baseline, color='r', linewidth=2)
1414

1515
plt.show()

0 commit comments

Comments
 (0)