本文整理汇总了Python中matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg.zoom方法的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2WxAgg.zoom方法的具体用法?Python NavigationToolbar2WxAgg.zoom怎么用?Python NavigationToolbar2WxAgg.zoom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg
的用法示例。
在下文中一共展示了NavigationToolbar2WxAgg.zoom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: zoom
# 需要导入模块: from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg [as 别名]
# 或者: from matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg import zoom [as 别名]
def zoom(self, *args):
self.ToggleTool(self.wx_ids["Pan"], False)
self.ToggleTool(self.ON_MARKRINGS, False)
self.ToggleTool(self.ON_MARKSPOTS, False)
NavigationToolbar2WxAgg.zoom(self, *args)
示例2: zoom
# 需要导入模块: from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg [as 别名]
# 或者: from matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg import zoom [as 别名]
def zoom(self, ev):
if wx.Platform == "__WXMAC__":
self.ToggleTool(self.wx_ids["Zoom"], self.GetToolState(self.wx_ids["Zoom"]))
NavToolbar.zoom(self, ev)
示例3: InterpretationEditorFrame
# 需要导入模块: from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg [as 别名]
# 或者: from matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg import zoom [as 别名]
#.........这里部分代码省略.........
#windows
display_window_0 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
display_window_1 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
display_window_2 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
name_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
bounds_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
buttons1_window = wx.GridSizer(4, 1, 5*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
display_window_0.AddMany( [(self.coordinates_box, wx.ALIGN_LEFT),
(self.show_box, wx.ALIGN_LEFT)] )
display_window_1.AddMany( [(self.level_box, wx.ALIGN_LEFT),
(self.level_names, wx.ALIGN_LEFT)] )
display_window_2.AddMany( [(self.mean_type_box, wx.ALIGN_LEFT),
(self.mean_fit_box, wx.ALIGN_LEFT)] )
name_window.AddMany( [(self.name_box, wx.ALIGN_LEFT),
(self.color_box, wx.ALIGN_LEFT)] )
bounds_window.AddMany( [(self.tmin_box, wx.ALIGN_LEFT),
(self.tmax_box, wx.ALIGN_LEFT)] )
buttons1_window.AddMany( [(self.add_fit_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
(self.add_all_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
(self.delete_fit_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
(self.apply_changes_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0)])
self.display_sizer.Add(display_window_0, 1, wx.TOP|wx.EXPAND, 8)
self.display_sizer.Add(display_window_1, 1, wx.TOP | wx.LEFT|wx.EXPAND, 8)
self.display_sizer.Add(display_window_2, 1, wx.TOP | wx.LEFT|wx.EXPAND, 8)
self.name_sizer.Add(name_window, 1, wx.TOP, 5.5)
self.bounds_sizer.Add(bounds_window, 1, wx.TOP, 5.5)
self.buttons_sizer.Add(buttons1_window, 1, wx.TOP, 0)
#duplicate high levels plot
self.fig = Figure((2.5*self.GUI_RESOLUTION, 2.5*self.GUI_RESOLUTION), dpi=100)
self.canvas = FigCanvas(self.panel, -1, self.fig, )
self.toolbar = NavigationToolbar(self.canvas)
self.toolbar.Hide()
self.toolbar.zoom()
self.high_EA_setting = "Zoom"
self.canvas.Bind(wx.EVT_LEFT_DCLICK,self.on_equalarea_high_select)
self.canvas.Bind(wx.EVT_MOTION,self.on_change_high_mouse_cursor)
self.canvas.Bind(wx.EVT_MIDDLE_DOWN,self.home_high_equalarea)
self.canvas.Bind(wx.EVT_RIGHT_DOWN,self.pan_zoom_high_equalarea)
self.canvas.SetHelpText(dieh.eqarea_help)
self.eqarea = self.fig.add_subplot(111)
draw_net(self.eqarea)
#Higher Level Statistics Box
self.stats_sizer = wx.StaticBoxSizer( wx.StaticBox( self.panel, wx.ID_ANY,"mean statistics" ), wx.VERTICAL)
for parameter in ['mean_type','dec','inc','alpha95','K','R','n_lines','n_planes']:
COMMAND="self.%s_window=wx.TextCtrl(self.panel,style=wx.TE_CENTER|wx.TE_READONLY,size=(100*self.GUI_RESOLUTION,25))"%parameter
exec(COMMAND)
COMMAND="self.%s_window.SetBackgroundColour(wx.WHITE)"%parameter
exec(COMMAND)
COMMAND="self.%s_window.SetFont(font2)"%parameter
exec(COMMAND)
COMMAND="self.%s_outer_window = wx.GridSizer(1,2,5*self.GUI_RESOLUTION,15*self.GUI_RESOLUTION)"%parameter
exec(COMMAND)
COMMAND="""self.%s_outer_window.AddMany([
(wx.StaticText(self.panel,label='%s',style=wx.TE_CENTER),wx.EXPAND),
(self.%s_window, wx.EXPAND)])"""%(parameter,parameter,parameter)
exec(COMMAND)
COMMAND="self.stats_sizer.Add(self.%s_outer_window, 1, wx.ALIGN_LEFT|wx.EXPAND, 0)"%parameter
exec(COMMAND)
self.switch_stats_button = wx.SpinButton(self.panel, id=wx.ID_ANY, style=wx.SP_HORIZONTAL|wx.SP_ARROW_KEYS|wx.SP_WRAP, name="change stats")
self.Bind(wx.EVT_SPIN, self.on_select_stats_button,self.switch_stats_button)
self.switch_stats_button.SetHelpText(dieh.switch_stats_btn_help)
示例4: InterpretationEditorFrame
# 需要导入模块: from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg [as 别名]
# 或者: from matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg import zoom [as 别名]
#.........这里部分代码省略.........
buttons1_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
buttons2_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
buttons3_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
buttons4_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
display_window_0.AddMany( [(self.coordinates_box, wx.ALIGN_LEFT),
(self.show_box, wx.ALIGN_LEFT)] )
display_window_1.AddMany( [(self.level_box, wx.ALIGN_LEFT),
(self.mean_type_box, wx.ALIGN_LEFT)] )
display_window_2.AddMany( [(self.level_names, wx.ALIGN_LEFT),
(self.mean_fit_box, wx.ALIGN_LEFT)] )
name_window.AddMany( [(self.name_box, wx.ALIGN_LEFT),
(self.color_box, wx.ALIGN_LEFT)] )
bounds_window.AddMany( [(self.tmin_box, wx.ALIGN_LEFT),
(self.tmax_box, wx.ALIGN_LEFT)] )
buttons1_window.Add(self.add_fit_button, wx.ALIGN_TOP)
buttons2_window.Add(self.add_all_button, wx.ALIGN_TOP)
buttons3_window.Add(self.delete_fit_button, wx.ALIGN_TOP)
buttons4_window.Add(self.apply_changes_button, wx.ALIGN_TOP)
self.display_sizer.Add(display_window_0, 0, wx.TOP, 8)
self.display_sizer.Add(display_window_1, 0, wx.TOP | wx.LEFT, 8)
self.display_sizer.Add(display_window_2, 0, wx.TOP | wx.LEFT, 8)
self.name_sizer.Add(name_window, 0, wx.TOP, 5.5)
self.bounds_sizer.Add(bounds_window, 0, wx.TOP, 5.5)
self.buttons_sizer.Add(buttons1_window, 0, wx.TOP, button_spacing)
self.buttons_sizer.Add(buttons2_window, 0, wx.TOP, button_spacing)
self.buttons_sizer.Add(buttons3_window, 0, wx.TOP, button_spacing)
self.buttons_sizer.Add(buttons4_window, 0, wx.TOP, button_spacing)
#duplicate higher levels plot
self.fig = copy(self.parent.fig4)
self.canvas = FigCanvas(self.panel, -1, self.fig)
self.toolbar = NavigationToolbar(self.canvas)
self.toolbar.Hide()
self.toolbar.zoom()
self.higher_EA_setting = "Zoom"
self.canvas.Bind(wx.EVT_LEFT_DCLICK,self.parent.on_equalarea_higher_select)
self.canvas.Bind(wx.EVT_MOTION,self.on_change_higher_mouse_cursor)
self.canvas.Bind(wx.EVT_MIDDLE_DOWN,self.home_higher_equalarea)
#Higher Level Statistics Box
self.stats_sizer = wx.StaticBoxSizer( wx.StaticBox( self.panel, wx.ID_ANY,"mean statistics" ), wx.VERTICAL)
for parameter in ['mean_type','dec','inc','alpha95','K','R','n_lines','n_planes']:
COMMAND="self.%s_window=wx.TextCtrl(self.panel,style=wx.TE_CENTER|wx.TE_READONLY,size=(75*self.GUI_RESOLUTION,25))"%parameter
exec COMMAND
COMMAND="self.%s_window.SetBackgroundColour(wx.WHITE)"%parameter
exec COMMAND
COMMAND="self.%s_window.SetFont(font2)"%parameter
exec COMMAND
COMMAND="self.%s_outer_window = wx.GridSizer(1,2,5*self.GUI_RESOLUTION,15*self.GUI_RESOLUTION)"%parameter
exec COMMAND
COMMAND="""self.%s_outer_window.AddMany([
(wx.StaticText(self.panel,label='%s',style=wx.TE_CENTER),wx.EXPAND),
(self.%s_window, wx.EXPAND)])"""%(parameter,parameter,parameter)
exec COMMAND
COMMAND="self.stats_sizer.Add(self.%s_outer_window, 0, wx.ALIGN_LEFT, 0)"%parameter
exec COMMAND
self.switch_stats_button = wx.SpinButton(self.panel, id=wx.ID_ANY, style=wx.SP_HORIZONTAL|wx.SP_ARROW_KEYS|wx.SP_WRAP, name="change stats")
self.Bind(wx.EVT_SPIN, self.on_select_stats_button,self.switch_stats_button)
#construct panel
hbox0 = wx.BoxSizer(wx.HORIZONTAL)
hbox0.Add(self.name_sizer,flag=wx.ALIGN_TOP,border=8)
hbox0.Add(self.bounds_sizer,flag=wx.ALIGN_TOP,border=8)
示例5: zoom
# 需要导入模块: from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg [as 别名]
# 或者: from matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg import zoom [as 别名]
def zoom(self, *args):
self.ToggleTool(self.wx_ids['Pan'], False)
self.ToggleTool(self.ON_LABELPEAKS, False)
NavigationToolbar2WxAgg.zoom(self, *args)