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

Skip to content

Commit d37df04

Browse files
committed
Merge pull request #4845 from ericmjl/mep12_print_stdout.py
mep12 on print_stdout.py
2 parents e9e8acb + 1131a46 commit d37df04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32
# print png to standard out
43
# usage: python print_stdout.py > somefile.png
4+
55
import sys
66
import matplotlib
77
matplotlib.use('Agg')
8-
from pylab import *
8+
import matplotlib.pyplot as plt
99

10-
plot([1, 2, 3])
10+
plt.plot([1, 2, 3])
1111

12-
savefig(sys.stdout)
13-
show()
12+
plt.savefig(sys.stdout)
13+
plt.show()

0 commit comments

Comments
 (0)