1 """
2 Panels for displaying tuning curves.
3
4 Uses a PlotGroup to generate the pylab plots
5 which are currently displayed separately from the gui.
6
7 $Id: featurecurvepanel.py 11310 2010-07-27 16:56:14Z ceball $
8 """
9 __version__='$Revision: 11310 $'
10
11 import topo
12
13 from topo.base.projection import ProjectionSheet
14
15 from plotgrouppanel import PlotGroupPanel
22
23
24 sheet_type = ProjectionSheet
25
26 @classmethod
27 - def valid_context(cls):
28 if topo.sim.objects(cls.sheet_type).items():
29 return True
30 else:
31 return False
32
33
34 - def __init__(self,master,plotgroup,**params):
35 PlotGroupPanel.__init__(self,master,plotgroup,**params)
36
37 self.pack_param("sheet",parent=self.control_frame_3,
38 on_modify=self.sheet_change,side='left',expand=1,
39 widget_options={'new_default':True,
40 'sort_fn_args':{'cmp':lambda x, y: cmp(-x.precedence,-y.precedence)}})
41
42 self.pack_param("x",parent=self.control_frame_4)
43 self.pack_param("y",parent=self.control_frame_4)
44
45
46
47 for name in ['Enlarge','Reduce','Back','Fwd']: self.hide_param(name)
48
49 self.auto_refresh= False
50 if self.plotgroup.plot_immediately:
51 self.refresh()
52
53 self.sheet_change()
54
55
56
76
77
78
82
83
88
91
92
94 """Plots are displayed in new windows, so do not add any labels."""
95 pass
96