matplotlib

Previous topic

pylab_examples example code: polar_legend.py

Next topic

pylab_examples example code: psd_demo.py

This Page

pylab_examples example code: print_stdout.pyΒΆ

[source code]

#!/usr/bin/env python
# -*- noplot -*-
# print png to standard out
# usage: python print_stdout.py > somefile.png
import sys
import matplotlib
matplotlib.use('Agg')
from pylab import *

plot([1, 2, 3])

savefig(sys.stdout)
show()

Keywords: python, matplotlib, pylab, example, codex (see Search examples)