2121import sys , time , os , gc
2222import matplotlib
2323matplotlib .use ('WXAgg' )
24- from matplotlib import rcParams
25- rcParams ['image.origin' ] = 'upper' # 'lower': nav toolbar problem -ADS
2624import matplotlib .cm as cm
2725from matplotlib .backends .backend_wxagg import Toolbar , FigureCanvasWxAgg
2826from matplotlib .figure import Figure
2927import matplotlib .numerix as numerix
28+ from matplotlib .mlab import meshgrid
29+
3030from wxPython .wx import *
3131from wxPython .xrc import *
3232
3333ERR_TOL = 1e-5 # floating point slop for peak-detection
3434
35+
36+ matplotlib .rc ('image' , origin = 'upper' )
37+
3538class PlotPanel (wxPanel ):
3639
3740 def __init__ (self , parent ):
@@ -54,11 +57,10 @@ def __init__(self, parent):
5457
5558 def init_plot_data (self ):
5659 a = self .fig .add_subplot (111 )
57- self .x = numerix .arange (120.0 )* 2 * numerix .pi / 60.0
58- self .x .resize ((100 ,120 ))
59- self .y = numerix .arange (100.0 )* 2 * numerix .pi / 50.0
60- self .y .resize ((120 ,100 ))
61- self .y = numerix .transpose (self .y )
60+
61+ x = numerix .arange (120.0 )* 2 * numerix .pi / 60.0
62+ y = numerix .arange (100.0 )* 2 * numerix .pi / 50.0
63+ self .x , self .y = meshgrid (x , y )
6264 z = numerix .sin (self .x ) + numerix .cos (self .y )
6365 self .im = a .imshow ( z , cmap = cm .jet )#, interpolation='nearest')
6466
0 commit comments