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

Skip to content

Commit c572eb9

Browse files
committed
mep12 on print_stdout.py
1 parent 263c06a commit c572eb9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
#!/usr/bin/env python
2-
# -*- noplot -*-
3-
# print png to standard out
4-
# usage: python print_stdout.py > somefile.png
51
import sys
62
import matplotlib
73
matplotlib.use('Agg')
8-
from pylab import *
4+
import matplotlib.pyplot as plt
95

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

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

0 commit comments

Comments
 (0)