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

Skip to content

Commit 0c8afa5

Browse files
committed
simplified syntax
1 parent d501818 commit 0c8afa5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/pylab_examples/log_bar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
plt.xlabel("FOO")
77
plt.ylabel("FOO")
88
plt.title("Testing")
9-
plt.gca().set_yscale('log')
9+
plt.yscale('log')
1010

1111
dim = len(data[0])
1212
w = 0.75
@@ -16,7 +16,7 @@
1616
for i in range(len(data[0])):
1717
y = [d[i] for d in data]
1818
b = plt.bar(x + i * dimw, y, dimw, bottom=0.001)
19-
plt.gca().set_xticks(x + w / 2)
20-
plt.gca().set_ylim((0.001, 1000))
19+
plt.xticks(x + w / 2)
20+
plt.ylim((0.001, 1000))
2121

2222
plt.show()

0 commit comments

Comments
 (0)