~spud/spud/windows

« back to all changes in this revision

Viewing changes to pyinstaller/buildtests/test-matplotlib_i.py

  • Committer: Fraser Waters
  • Date: 2011-09-01 05:24:33 UTC
  • Revision ID: fraser.waters08@imperial.ac.uk-20110901052433-60uo51x0d76qze9x
Delete pyinstaller, doesn't match our needs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# -*- coding: utf-8 -*-
3
 
 
4
 
import numpy
5
 
from matplotlib import mlab
6
 
from matplotlib import pyplot
7
 
 
8
 
 
9
 
def main():
10
 
    # Part of the example at 
11
 
    # http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/contour_demo.py
12
 
    delta = 0.025
13
 
    x = numpy.arange(-3.0, 3.0, delta)
14
 
    y = numpy.arange(-2.0, 2.0, delta)
15
 
    X, Y = numpy.meshgrid(x, y)
16
 
    Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
17
 
    Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
18
 
    Z = 10.0 * (Z2 - Z1)
19
 
    pyplot.figure()
20
 
    CS = pyplot.contour(X, Y, Z)
21
 
    pyplot.show()
22
 
 
23
 
 
24
 
if __name__ == "__main__":
25
 
    main()