当前位置: 首页>>代码示例>>Python>>正文


Python backend_wxagg.NavigationToolbar2WxAgg类代码示例

本文整理汇总了Python中matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2WxAgg类的具体用法?Python NavigationToolbar2WxAgg怎么用?Python NavigationToolbar2WxAgg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了NavigationToolbar2WxAgg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, canvas, main):
        self.main = main

        navId = wx.NewId()
        NavigationToolbar2WxAgg.__init__(self, canvas)
        self.AddSimpleTool(navId, _load_bitmap("subplots.png"), "Range", "Set plot range")
        wx.EVT_TOOL(self, navId, self.on_range)
开发者ID:stephenong,项目名称:RTLSDR-Scanner,代码行数:7,代码来源:rtlsdr_scan.py

示例2: __init__

    def __init__(self, plotCanvas):
        # create the default toolbar
        NavigationToolbar2WxAgg.__init__(self, plotCanvas)
        # remove the unwanted button
        POSITION_OF_CONFIGURE_SUBPLOTS_BTN = 7

        self.DeleteToolByPos(POSITION_OF_CONFIGURE_SUBPLOTS_BTN)
开发者ID:Edasn,项目名称:CaptorRadio-v2,代码行数:7,代码来源:interfaz2.py

示例3: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar2WxAgg.__init__(self, canvas)
        self.canvas = canvas
        #setattr(self,'datajours', getattr(canvas.GetParent(),'datajours'))
        for name in dir(canvas.GetParent()):
	    #print "name= :", name
            if name in ["datayear","vg0","vg0_2","year","nyear","month","day","nday","pm10","aot1020"]:
                setattr(self,name,getattr(canvas.GetParent(),name))
	
       

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.
        self.ON_PREVIOUS = wx.NewId()
        self.ON_NEXT = wx.NewId()
        self.ON_LISTE = wx.NewId()

        self.AddSimpleTool(self.ON_PREVIOUS, _load_bitmap('stock_left.xpm'), 'Courbe precedente', 'Courbe precedente')
        self.AddSimpleTool(self.ON_NEXT, _load_bitmap('stock_right.xpm'), 'Courbe suivante', 'Courbe suivante')
        self.AddSimpleTool(self.ON_LISTE, _load_bitmap('stock_up.xpm'), 'Liste par date', 'Liste par date')

        wx.EVT_TOOL(self, self.ON_PREVIOUS, self._on_previous)
        wx.EVT_TOOL(self, self.ON_NEXT, self._on_next)
        wx.EVT_TOOL(self, self.ON_LISTE, self._on_liste)
	
	self.inityear()
        
        self.draw()
开发者ID:fbrute,项目名称:pm_aot_tfeuilla,代码行数:28,代码来源:wxpy_aot_pm10_2006_ou_2012_sep_dec.py

示例4: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar2WxAgg.__init__(self, canvas)

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.
        self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap("stock_left.xpm"), "Click me", "Activate custom contol")
        EVT_TOOL(self, self.ON_CUSTOM, self._on_custom)
开发者ID:eddienko,项目名称:SamPy,代码行数:7,代码来源:embedding_in_wx4.py

示例5: __init__

    def __init__(self, frame_object):
        """ Constructor for toolbar object

        @type self: Toolbar
        @type frame_object: MainFrame
            the frame object that the toolbar will be in/part of
        @rtype: None
        """
        NavigationToolbar2WxAgg.__init__(self, frame_object.canvas)
        self.frame_object = frame_object        
        # Deleting unwanted icons in standard toolbar
        self.DeleteToolByPos(8)
        self.DeleteToolByPos(1)
        self.DeleteToolByPos(1)
        
        self.InsertSeparator(6)
        self.InsertSeparator(6)

        self.AddSimpleTool(self.ON_PREVIOUS, _load_bitmap('back.png'),
                           'Previous Run', 'Activate custom control')
        wx.EVT_TOOL(self, self.ON_PREVIOUS, self._on_previous)
        
        self.AddSimpleTool(self.ON_NEXT, _load_bitmap('forward.png'),
                           'Next Run', 'Activate custom control')
        wx.EVT_TOOL(self, self.ON_NEXT, self._on_next)        
        
        self.AddSimpleTool(self.ON_EXTRACT, _load_bitmap('filesave.png'),
                           'Save to Excel', 'Activate custom control')
        wx.EVT_TOOL(self, self.ON_EXTRACT, self._on_extract)
开发者ID:rubenflamshepherd,项目名称:CATEautomator,代码行数:29,代码来源:Custom.py

示例6: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar2WxAgg.__init__(self, canvas)

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.
        self.ON_PREVIOUS = wx.NewId()
        self.ON_NEXT = wx.NewId()
        self.ON_LISTE = wx.NewId()

        self.AddSimpleTool(self.ON_PREVIOUS, _load_bitmap('stock_left.xpm'), 'Courbe precedente', 'Courbe precedente')
        self.AddSimpleTool(self.ON_NEXT, _load_bitmap('stock_right.xpm'), 'Courbe suivante', 'Courbe suivante')
        self.AddSimpleTool(self.ON_LISTE, _load_bitmap('stock_up.xpm'), 'Liste par date', 'Liste par date')

        wx.EVT_TOOL(self, self.ON_PREVIOUS, self._on_previous)
        wx.EVT_TOOL(self, self.ON_NEXT, self._on_next)
        wx.EVT_TOOL(self, self.ON_LISTE, self._on_liste)

        self.diryears = datayears

        print self.diryears
        #keys_sort = self.diryears.keys()
        #keys_sort.sort()
        #self.premyear = self.diryears[keys_sort[0]]
        #self.premyear = datayears[0]
        self.premyear = 2005
        #self.deryear = self.diryears[keys_sort[len(keys_sort)-1]]
        #self.deryear = datayears[len(datayears)-1] 
        self.deryear = 2012 
        self.njour = self.premyear 
        self.compteuryear = 0 

        self.prepdata()
        self.draw()
开发者ID:fbrute,项目名称:pm_aot_tfeuilla,代码行数:33,代码来源:wx_py_aot_pm10_reg.py

示例7: __init__

    def __init__(self, plotCanvas):
        NavigationToolbar2WxAgg.__init__(self, plotCanvas)
        
#        self.SetToolBitmapSize(wx.Size(10,10))
        # delete unwanted tools
        self.DeleteToolByPos(6) # Configure subplots
        self.DeleteToolByPos(3) # Pan

        self.Realize()
开发者ID:xquiet,项目名称:openstereonet,代码行数:9,代码来源:RosePanel.py

示例8: __init__

 def __init__(self, plot_canvas):
     NavigationToolbar2WxAgg.__init__(self, plot_canvas)
     #Delete home tool
     #TODO add after history clear is added at each plot_refresh
     self.DeleteToolByPos(0)
     #add refresh plot button
     self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_refresh.xpm'),
                        'Click me', 'Activate custom control')
     wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom)
开发者ID:kolodkin,项目名称:CsvPlotter,代码行数:9,代码来源:CsvPlotter.py

示例9: __init__

    def __init__(self, canvas, panel, settings, callBackHideOverlay):
        self.panel = panel
        self.settings = settings
        self.callBackHideOverlay = callBackHideOverlay
        self.plot = None
        self.extraTools = []
        self.panPos = None

        NavigationToolbar2WxAgg.__init__(self, canvas)
        if matplotlib.__version__ >= '1.2':
            panId = self.wx_ids['Pan']
        else:
            panId = self.FindById(self._NTB2_PAN).GetId()

        self.ToggleTool(panId, True)
        self.pan()

        self.__add_spacer()

        liveId = wx.NewId()
        self.AddCheckTool(liveId, load_bitmap('auto_refresh'),
                          shortHelp='Real time plotting\n(slow and buggy)')
        self.ToggleTool(liveId, settings.liveUpdate)
        wx.EVT_TOOL(self, liveId, self.__on_check_update)

        gridId = wx.NewId()
        self.AddCheckTool(gridId, load_bitmap('grid'),
                          shortHelp='Toggle plot grid')
        self.ToggleTool(gridId, settings.grid)
        wx.EVT_TOOL(self, gridId, self.__on_check_grid)

        peakId = wx.NewId()
        self.AddCheckTool(peakId, load_bitmap('peak'),
                          shortHelp='Label peak')
        self.ToggleTool(peakId, settings.annotate)
        wx.EVT_TOOL(self, peakId, self.__on_check_peak)

        self.__add_spacer()

        self.autoFId = wx.NewId()
        self.AddCheckTool(self.autoFId, load_bitmap('auto_f'),
                          shortHelp='Auto range frequency')
        self.ToggleTool(self.autoFId, settings.autoF)
        wx.EVT_TOOL(self, self.autoFId, self.__on_check_auto_f)

        self.autoLId = wx.NewId()
        self.AddCheckTool(self.autoLId, load_bitmap('auto_l'),
                          shortHelp='Auto range level')
        self.ToggleTool(self.autoLId, settings.autoL)
        wx.EVT_TOOL(self, self.autoLId, self.__on_check_auto_l)

        self.autoTId = None
        self.maxId = None
        self.minId = None
        self.avgId = None
        self.varId = None
        self.colourId = None
开发者ID:B-Rich,项目名称:RTLSDR-Scanner,代码行数:57,代码来源:toolbars.py

示例10: __init__

 def __init__(self, canvas, tools=('Home', 'Pan', 'Zoom', 'Save')):
     NavigationToolbar2WxAgg.__init__(self, canvas)
     i = 0
     for pos, tool in enumerate(self.toolitems):
         if tool[0] not in tools:
             self.DeleteToolByPos(pos-i)
             i+=1
     self.AddSimpleTool(self.ON_CONFIG, wx.Bitmap(basedir+'/images/preferences-system-mpl.png'),
                        'Customize', 'Customize')
     wx.EVT_TOOL(self, self.ON_CONFIG, self._on_config)
开发者ID:mrkwjc,项目名称:ffnetui,代码行数:10,代码来源:mplwx.py

示例11: __init__

    def __init__(self,  canvas):
        NavigationToolbar2WxAgg.__init__(self,canvas)

        # # In mpl 1.2 the Toolbar is restructured which requires a hack
        # if int(matplotlib.__version__.split('.')[1]) >= 2:
        #     self._NTB2_PAN = self.wx_ids['Pan']
        #     self._NTB2_ZOOM = self.wx_ids['Zoom']

        # self._CHECK_TOOLS = (self._NTB2_PAN,self._NTB2_ZOOM,self._LINESELECT,self._PIXELINSPECTOR)
        self.canvas = canvas
开发者ID:pathoren,项目名称:FigureLoader,代码行数:10,代码来源:FigureLoader.py

示例12: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar2WxAgg.__init__(self, canvas)

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.
        self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_left.xpm'),
                           'Click me', 'Activate custom contol')
        #self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_left.xpm'),
                           #'Click me', 'Save to PDF format')       
        wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom)
        #wx.EVT_TOOL(self, self.ON_SAVETOPDF, self._on_savetopdf)
        self.canvas = canvas
开发者ID:Junlings,项目名称:webfe,代码行数:12,代码来源:plotframe.py

示例13: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar2WxAgg.__init__(self, canvas)

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.wx.ART_FOLDER_OPEN 
        #wx.ArtProvider.GetBitmap(wx.ART_FOLDER_OPEN) is the stock icons command
        self.AddSimpleTool(self.ON_CUSTOM, wx.ArtProvider.GetBitmap(wx.ART_FOLDER_OPEN),
                           'Plot measurement', 'Plot an XML data file')
        wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom)
        
        self.AddSimpleTool(self.ON_CUSTOM, wx.ArtProvider.GetBitmap(wx.ART_FOLDER_OPEN),
                           'Click me', 'Activate custom contol')
开发者ID:aricsanders,项目名称:pyMeasureNew,代码行数:12,代码来源:MatplotlibWxPanel.py

示例14: MPLPanel

class MPLPanel(wx.Panel):
    def __init__(self, *args, **kwargs):
        super(MPLPanel, self).__init__(*args, **kwargs)

        # Setup the canvas
        self.dpi = 100
        self.fig = Figure((3.0, 2.0), dpi=self.dpi)
        self.ax1 = None
        self.ax2 = None
        self.canvas = FigCanvas(self, -1, self.fig)
        self.data = []

        # Setup the toolbar/statustextctrl
        self.toolbar = NavigationToolbar(self.canvas)
        self.toolbar.dynamic_update()
        self.testButton = wx.Button(self.toolbar, label="Pause")
        self.toolbar.AddControl(self.testButton)
        self.toolbar.AddSeparator()
        self.statusctrl = wx.StaticText(self.toolbar, style=wx.TE_READONLY, size=wx.Size(300, 25))
        self.toolbar.AddControl(self.statusctrl)

        # Do the layout
        panelvbox = wx.BoxSizer(wx.VERTICAL)
        panelvbox.Add(self.canvas, 1, flag=wx.EXPAND | wx.GROW | wx.ALL)
        panelvbox.Add(self.toolbar, 0, flag=wx.EXPAND | wx.GROW | wx.ALL)
        self.SetSizer(panelvbox)
        panelvbox.Fit(self)
        self.canvas.draw()
开发者ID:asippel89,项目名称:hologui,代码行数:28,代码来源:mplpanel.py

示例15: __init__

    def __init__(self, canvas, cankill):
        NavigationToolbar.__init__(self, canvas)

        # for simplicity I'm going to reuse a bitmap from wx, you'll
        # probably want to add your own.
        tool = self.AddTool(wx.ID_ANY, 'Click me', _load_bitmap('back.png'),
                            'Activate custom contol')
        self.Bind(wx.EVT_TOOL, self._on_custom, id=tool.GetId())
开发者ID:NelleV,项目名称:matplotlib,代码行数:8,代码来源:embedding_in_wx4_sgskip.py


注:本文中的matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。