File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
21"""
32You can specify whether images should be plotted with the array origin
43x[0,0] in the upper left or upper right by using the origin parameter.
54You can also control the default be setting image.origin in your
65matplotlibrc file; see http://matplotlib.org/matplotlibrc
76"""
8- from pylab import *
7+ import matplotlib .pyplot as plt
8+ import numpy as np
99
10- x = arange (100.0 )
10+ x = np . arange (100.0 )
1111x .shape = (10 , 10 )
1212
1313interp = 'bilinear'
1414#interp = 'nearest'
1515lim = - 2 , 11 , - 2 , 6
16- subplot (211 , axisbg = 'g' )
17- title ('blue should be up' )
18- imshow (x , origin = 'upper' , interpolation = interp )
19- #axis(lim)
16+ plt . subplot (211 , axisbg = 'g' )
17+ plt . title ('blue should be up' )
18+ plt . imshow (x , origin = 'upper' , interpolation = interp , cmap = 'jet' )
19+ #plt. axis(lim)
2020
21- subplot (212 , axisbg = 'y' )
22- title ('blue should be down' )
23- imshow (x , origin = 'lower' , interpolation = interp )
24- #axis(lim)
25- show ()
21+ plt . subplot (212 , axisbg = 'y' )
22+ plt . title ('blue should be down' )
23+ plt . imshow (x , origin = 'lower' , interpolation = interp , cmap = 'jet' )
24+ #plt. axis(lim)
25+ plt . show ()
You can’t perform that action at this time.
0 commit comments