Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e9e8acb + 1131a46 commit d37df04Copy full SHA for d37df04
1 file changed
examples/pylab_examples/print_stdout.py
@@ -1,13 +1,13 @@
1
-#!/usr/bin/env python
2
# -*- noplot -*-
3
# print png to standard out
4
# usage: python print_stdout.py > somefile.png
+
5
import sys
6
import matplotlib
7
matplotlib.use('Agg')
8
-from pylab import *
+import matplotlib.pyplot as plt
9
10
-plot([1, 2, 3])
+plt.plot([1, 2, 3])
11
12
-savefig(sys.stdout)
13
-show()
+plt.savefig(sys.stdout)
+plt.show()
0 commit comments