• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python backend_wx._load_bitmap函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __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


示例2: __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


示例3: __init__

    def __init__(self, graph_canvas):
        super(BioPepaToolbar, self).__init__(graph_canvas)
        cwd = os.getcwd()
        #WorldState.Instance() = WorldState.Instance()

        if (platform.system() == "Linux"):
            #save
            self.DeleteToolByPos(8)
            #subplots
            self.DeleteToolByPos(7)

        self.AddSimpleTool(self.ON_CUSTOM_ENLARGE, _load_bitmap(cwd + '/icons/full_screen.xpm'), 'Enlarge Graph', 'Enlarge Graph')
        wx.EVT_TOOL(self, self.ON_CUSTOM_ENLARGE, self._on_custom_enlarge)

        self.AddSimpleTool(self.ANNOTATE_ARROW, _load_bitmap(cwd + '/icons/arrow.xpm'), 'Annotate with an Arrow', 'Annotate with an Arrow')
        wx.EVT_TOOL(self, self.ANNOTATE_ARROW, self._on_custom_annotate_arrow)

        self.AddSimpleTool(self.ANNOTATE_TEXT, _load_bitmap(cwd + '/icons/text.xpm'), 'Annotate with Text', 'Annotate with Text')
        wx.EVT_TOOL(self, self.ANNOTATE_TEXT, self._on_custom_annotate_text)

        self.AddSimpleTool(self.ANNOTATE_TEXT_ARROW, _load_bitmap(cwd + '/icons/text_arrow.xpm'), 'Annotate with an Arrow and Text', 'Annotate with an Arrow and Text')
        wx.EVT_TOOL(self, self.ANNOTATE_TEXT_ARROW, self._on_custom_annotate_text_arrow)

        self.AddSimpleTool(self.ANNOTATE_CIRCLE, _load_bitmap(cwd + '/icons/circle.xpm'), 'Annotate with a circle', 'Annotate with a circle')
        wx.EVT_TOOL(self, self.ANNOTATE_CIRCLE, self._on_custom_annotate_circle)
开发者ID:jkhulme,项目名称:french75,代码行数:25,代码来源:custom_ui_elements.py


示例4: __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


示例5: _init_toolbar

    def _init_toolbar(self):
        self._parent = self.canvas.GetParent()
        self._NTB2_HOME = wx.NewId()
        self._NTB2_BACK = wx.NewId()
        self._NTB2_FORWARD = wx.NewId()
        self._NTB2_PAN = wx.NewId()
        self._NTB2_ZOOM = wx.NewId()
        self._NTB2_SAVE = wx.NewId()
        self._NTB2_PRINT = wx.NewId()
        self._NTB2_RESET = wx.NewId()

        # for mpl 1.2+ compatibility
        self.wx_ids = {}
        self.wx_ids['Back'] = self._NTB2_BACK
        self.wx_ids['Forward'] = self._NTB2_FORWARD
        self.wx_ids['Pan'] = self._NTB2_PAN
        self.wx_ids['Zoom'] = self._NTB2_ZOOM

        self.SetToolBitmapSize(wx.Size(24, 24))

        context_tip = 'Graph Menu: \n'
        context_tip += '    For more menu options, \n'
        context_tip += '    right-click the data symbols.'
        context = wx.ArtProvider.GetBitmap(wx.ART_LIST_VIEW, wx.ART_TOOLBAR)
        self.AddSimpleTool(self._NTB2_HOME, context, context_tip, context_tip)

        self.InsertSeparator(1)

        self.AddSimpleTool(self._NTB2_BACK, _load_bitmap('back.png'),
                           'Back', 'Back navigation view')
        self.AddSimpleTool(self._NTB2_FORWARD, _load_bitmap('forward.png'),
                           'Forward', 'Forward navigation view')
        # todo: get new bitmap
        self.AddCheckTool(self._NTB2_PAN, _load_bitmap('move.png'),
                          shortHelp='Pan',
                          longHelp='Pan with left, zoom with right')
        self.AddCheckTool(self._NTB2_ZOOM, _load_bitmap('zoom_to_rect.png'),
                          shortHelp='Zoom', longHelp='Zoom to rectangle')

        self.AddSeparator()
        self.AddSimpleTool(self._NTB2_SAVE, _load_bitmap('filesave.png'),
                           'Save', 'Save plot contents to file')

        print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR)
        self.AddSimpleTool(self._NTB2_PRINT, print_bmp, 'Print', 'Print plot')

        reset_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_HOME, wx.ART_TOOLBAR)
        self.AddSimpleTool(self._NTB2_RESET, reset_bmp, 'Reset', 'Reset graph range')

        bind(self, wx.EVT_TOOL, self.context_menu, id=self._NTB2_HOME)
        bind(self, wx.EVT_TOOL, self.forward, id=self._NTB2_FORWARD)
        bind(self, wx.EVT_TOOL, self.back, id=self._NTB2_BACK)
        bind(self, wx.EVT_TOOL, self.zoom, id=self._NTB2_ZOOM)
        bind(self, wx.EVT_TOOL, self.pan, id=self._NTB2_PAN)
        bind(self, wx.EVT_TOOL, self.save_figure, id=self._NTB2_SAVE)
        bind(self, wx.EVT_TOOL, self.print_figure, id=self._NTB2_PRINT)
        bind(self, wx.EVT_TOOL, self.home, id=self._NTB2_RESET)

        self.Realize()
开发者ID:imewei,项目名称:sasview,代码行数:59,代码来源:toolbar.py


示例6: __init__

 def __init__(self, plotCanvas):
     CONFIGURE_SUBPLOTS_TOOLBAR_BTN_POSITION = 6
     NavigationToolbar2Wx.__init__(self, plotCanvas)        
     # delete the toolbar button we don't want
     self.DeleteToolByPos(CONFIGURE_SUBPLOTS_TOOLBAR_BTN_POSITION) 
     # add the new toolbar buttons that we do want
     self.AddSimpleTool(self.ON_CUSTOM_LEFT, _load_bitmap('stock_left.xpm'),
                        'Pan to the left', 'Pan graph to the left')
     wx.EVT_TOOL(self, self.ON_CUSTOM_LEFT, self._on_custom_pan_left)
     self.AddSimpleTool(self.ON_CUSTOM_RIGHT, _load_bitmap('stock_right.xpm'),
                        'Pan to the right', 'Pan graph to the right')
     wx.EVT_TOOL(self, self.ON_CUSTOM_RIGHT, self._on_custom_pan_right)
开发者ID:jmhdz,项目名称:currentcostgui,代码行数:12,代码来源:currentcostgraphs.py


示例7: __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.
        if 'phoenix' in wx.PlatformInfo:
            self.AddTool(self.ON_CUSTOM, 'Click me',
                         _load_bitmap('back.png'),
                         'Activate custom contol')
            self.Bind(wx.EVT_TOOL, self._on_custom, id=self.ON_CUSTOM)
        else:
            self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('back.png'),
                               'Click me', 'Activate custom contol')
            self.Bind(wx.EVT_TOOL, self._on_custom, id=self.ON_CUSTOM)
开发者ID:DanHickstein,项目名称:matplotlib,代码行数:14,代码来源:embedding_in_wx4_sgskip.py


示例8: __init__

    def __init__(self, parent, canvas, cankill, OnUndo):

        self.cid = 0
        self.circles = []
        self.point3 = array([])
        self.point2 = array([])
        self.lines = []
        self.hist = ["start"]

        NavigationToolbar2WxAgg.__init__(self, canvas)

        self.statbar = None

        self.OnUndo = OnUndo
        self.parent = parent

        if self.parent.mpl_old:
            self.wx_ids = {"Pan": self._NTB2_PAN, "Zoom": self._NTB2_ZOOM}

        self.AddSeparator()

        self.AddCheckTool(
            self.ON_MARKRINGS,
            _load_bitmap(os.path.join(self.parent.iconspath, "3_point.png")),
            shortHelp="Mark Rings",
            longHelp="mark 3-points on a ring to find center",
        )
        wx.EVT_TOOL(self, self.ON_MARKRINGS, self._on_markrings)
        self.AddCheckTool(
            self.ON_MARKSPOTS,
            _load_bitmap(os.path.join(self.parent.iconspath, "2_point.png")),
            shortHelp="Mark Spots",
            longHelp="mark 2 spots to measure distance",
        )
        wx.EVT_TOOL(self, self.ON_MARKSPOTS, self._on_markspots)

        self.AddSeparator()

        self.AddSimpleTool(
            self.ON_INTEGRATE,
            _load_bitmap(os.path.join(self.parent.iconspath, "profile.png")),
            "Profile",
            "Extract profiles from the diffraction pattern",
        )
        wx.EVT_TOOL(self, self.ON_INTEGRATE, self._on_integrate)
        undo_ico = wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR, (16, 16))
        self.AddSimpleTool(self.ON_UNDO, undo_ico, "Undo", "Undo last point or ring")
        wx.EVT_TOOL(self, self.ON_UNDO, self._on_undo)
开发者ID:bcolsen,项目名称:diffraction-ring-profiler,代码行数:48,代码来源:diffraction_ring_profiler.py


示例9: __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


示例10: __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


示例11: __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


示例12: SetToolBar

    def SetToolBar(self, toolbar):
        from matplotlib.backends.backend_wx import _load_bitmap
        toolbar.Hide()
        tb = self.CreateToolBar((wx.TB_HORIZONTAL|wx.TB_TEXT))

        _NTB2_HOME = wx.NewId()
        _NTB2_BACK = wx.NewId()
        _NTB2_FORWARD = wx.NewId()
        _NTB2_PAN = wx.NewId()
        _NTB2_ZOOM = wx.NewId()
        _NTB2_SAVE = wx.NewId()
        _NTB2_SUBPLOT = wx.NewId()
        tb.AddSimpleTool(_NTB2_HOME, _load_bitmap('home.png'), 'Home', 'Reset original view')
        tb.AddSimpleTool(_NTB2_BACK, _load_bitmap('back.png'), 'Back', 'Back navigation view')
        tb.AddSimpleTool(_NTB2_FORWARD, _load_bitmap('forward.png'), 'Forward', 'Forward navigation view')

        tb.AddCheckTool(_NTB2_PAN, _load_bitmap('move.png'), shortHelp='Pan', longHelp='Pan with left, zoom with right')
        tb.AddCheckTool(_NTB2_ZOOM, _load_bitmap('zoom_to_rect.png'), shortHelp='Zoom', longHelp='Zoom to rectangle')

        tb.AddSeparator()
        tb.AddSimpleTool(_NTB2_SUBPLOT, _load_bitmap('subplots.png'), 'Configure subplots', 'Configure subplot parameters')
        tb.AddSimpleTool(_NTB2_SAVE, _load_bitmap('filesave.png'), 'Save', 'Save plot contents to file')

        self.Bind(wx.EVT_TOOL, toolbar.home, id=_NTB2_HOME)
        self.Bind(wx.EVT_TOOL, toolbar.forward, id=_NTB2_FORWARD)
        self.Bind(wx.EVT_TOOL, toolbar.back, id=_NTB2_BACK)
        self.Bind(wx.EVT_TOOL, toolbar.zoom, id=_NTB2_ZOOM)
        self.Bind(wx.EVT_TOOL, toolbar.pan, id=_NTB2_PAN)
        self.Bind(wx.EVT_TOOL, toolbar.configure_subplots, id=_NTB2_SUBPLOT)
        self.Bind(wx.EVT_TOOL, toolbar.save_figure, id=_NTB2_SAVE)

        tb.Realize()  
开发者ID:AnneCarpenter,项目名称:CellProfiler-Analyst,代码行数:32,代码来源:boxplot.py


示例13: _init_toolbar

 def _init_toolbar(self, *args):
     NavigationToolbar2Wx._init_toolbar(self, *args)
     self.AddSimpleTool(_NTB_PLAY, _load_bitmap('forward.xpm'),
                        'Play', 'Start playing')
     self.AddSimpleTool(_NTB_LEFT, _load_bitmap('stock_left.xpm'),
                        'Left', 'Jump one screen to the left')
     self.AddSimpleTool(_NTB_RIGHT, _load_bitmap('stock_right.xpm'),
                        'Right', 'Jump one screen to the right')
     self.AddSimpleTool(_NTB_DOWN, _load_bitmap('stock_down.xpm'),
                        'Down', 'Go down one channel')
     self.AddSimpleTool(_NTB_UP, _load_bitmap('stock_up.xpm'),
                        'Up', 'Go up one channel')
     self.Bind(EVT_REDRAW, self._on_redraw)
     bind(self, wx.EVT_TOOL, self._on_play, id=_NTB_PLAY)
     bind(self, wx.EVT_TOOL, self._on_left, id=_NTB_LEFT)
     bind(self, wx.EVT_TOOL, self._on_right, id=_NTB_RIGHT)
     bind(self, wx.EVT_TOOL, self._on_down, id=_NTB_DOWN)
     bind(self, wx.EVT_TOOL, self._on_up, id=_NTB_UP)
开发者ID:nejstastnejsistene,项目名称:ERPy,代码行数:18,代码来源:backend_wxagg_erpy.py


示例14: __init__

 def __init__(self, plotCanvas):
     # create the default toolbar
     NavigationToolbar.__init__(self, plotCanvas)
     # find where icons are located
     path = os.path.dirname(__file__)
     icon_file = os.path.join(path, 'data-export-icon.png')
     self.AddSimpleTool(self.EXPORT_DATA, _load_bitmap(icon_file),
                        'Export data', 'Export current data to file')
     wx.EVT_TOOL(self, self.EXPORT_DATA, self._on_export_data)
开发者ID:ansobolev,项目名称:shs,代码行数:9,代码来源:PlotFrame.py


示例15: __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


示例16: __init__

	def __init__(self,canvas):
		NavigationToolbar2Wx.__init__(self,canvas)
		self.canvas=canvas
		
		self.AddSeparator()
		self.IdConnect=wx.NewId()
		self.AddSimpleTool(self.IdConnect, _load_bitmap('stock_refresh.xpm'),'Connect',isToggle=True)
		self._connect=False
		
		self.IdClear=wx.NewId()
		self.AddSimpleTool(self.IdClear, _load_bitmap('stock_close.xpm'),'Clear')
		
		self.Bind(wx.EVT_TOOL, self.OnConnect, id=self.IdConnect)
		self._connect=None
		self._disconnect=None
		self.Bind(wx.EVT_TOOL, self.OnClear, id=self.IdClear)
		self._clear=None
		self._getlim=None
		
		self.Realize()
开发者ID:hanada-yasutaka,项目名称:Project-OnSight,代码行数:20,代码来源:PlotPanel.py


示例17: __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


示例18: __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 ["nyear","Config","datajours","vg0","year","month","day","nday","heure","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)

	cid = self.canvas.mpl_connect('button_press_event', self.onclick)
	cid = self.canvas.mpl_connect('key_press_event', self.onkey)

	import MySQLdb

	#self.db = MySQLdb.connect("calamar.univ-ag.fr","dbmeteodb","dbmeteodb","dbmeteodb")
	# localhost, alias for 127.0.0.1(default in mysql), marked in c:\windows\system32\drivers\etc
	# "127.0.0.1" works too, localhost
	self.db = MySQLdb.connect(host="localhost",user="dbmeteodb",passwd="dbmeteodb",db="dbmeteodb")

	self.cursor = self.db.cursor()

        self.initjour()

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


示例19: __init__

 def __init__(self, parent, canvas, cankill):
     NavigationToolbar2WxAgg.__init__(self, canvas)
     
     self.parent = parent
     
     if self.parent.mpl_old:
        self.wx_ids = {'Pan' : self._NTB2_PAN,'Zoom': self._NTB2_ZOOM}
     
     self.AddSeparator()
     
     self.AddCheckTool(self.ON_LABELPEAKS, _load_bitmap(os.path.join(self.parent.parent.iconspath, 'profile_label.png')),
             shortHelp= 'Label Peaks',longHelp= 'Click on a peak to label the d-spacing')
     
     self.AddSeparator()
     
     wx.EVT_TOOL(self, self.ON_LABELPEAKS, self._on_labelpeaks)
     self.AddSimpleTool(self.ON_CLEAR, _load_bitmap(os.path.join(self.parent.parent.iconspath, 'profile_good.png')),
                     'Clear Profiles', 'Clear all except the last profile')
     wx.EVT_TOOL(self, self.ON_CLEAR, self._on_clear)
     undo_ico = wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR, (16,16))
     self.AddSimpleTool(self.ON_UNDO, undo_ico,
                     'Undo', 'Go back to the previous profile')
     wx.EVT_TOOL(self, self.ON_UNDO, self._on_undo)
开发者ID:bcolsen,项目名称:diffraction-ring-profiler,代码行数:23,代码来源:profile.py


示例20: __init__

    def __init__(self, canvas, cankill):
        if wx.Platform != '__WXMAC__':
            NavToolbar.__init__(self, canvas)
        else:
            _realizer = self.Realize
            def f(): pass
            self.Realize = f
            NavToolbar.__init__(self, canvas)
            self.Realize = _realizer

        # Get rid of the configure subplots button
        self.DeleteToolByPos(6)

        # Add new buttons
        self.AddSimpleTool(wx.ID_PRINT,
               wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR),
               'Print', 'print graph')
        self.AddSimpleTool(DATA_SAVE_ID,
               _load_bitmap('stock_save_as.xpm'),
               'Export plot data', 'Export plot data to file')
        self.AddSeparator()
        self.AddSimpleTool(wx.ID_CLOSE,
               _load_bitmap('stock_close.xpm'),
               'Close window', 'Close window')
开发者ID:cfarrow,项目名称:diffpy.pdfgui,代码行数:24,代码来源:extendedplotframe.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python backend_wx.FigureCanvasWx类代码示例发布时间:2022-05-27
下一篇:
Python backend_webagg_core.FigureManagerWebAgg类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap