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


Python NavigationToolbar2QTAgg.move方法代码示例

本文整理汇总了Python中matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg.move方法的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2QTAgg.move方法的具体用法?Python NavigationToolbar2QTAgg.move怎么用?Python NavigationToolbar2QTAgg.move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg的用法示例。


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

示例1: AppForm

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import move [as 别名]

#.........这里部分代码省略.........
		tableAction = QtGui.QAction(QtGui.QIcon('table24.png'), 'Table', self)
		tableAction.setShortcut('Ctrl+T')
		tableAction.setStatusTip('Table View')
		tableAction.triggered.connect(self.show_table)

		graphAction = QtGui.QAction(QtGui.QIcon('graph24.png'), 'Graph', self)
		graphAction.setShortcut('Ctrl+G')
		graphAction.setStatusTip('Graphical View')
		graphAction.triggered.connect(self.show_graph)

		refreshAction = QtGui.QAction(QtGui.QIcon('refresh24.gif'), 'Refresh', self)
		refreshAction.setStatusTip('Refresh')
		refreshAction.triggered.connect(self.myrefresh)

		upAction = QtGui.QAction(QtGui.QIcon('up24.gif'), 'Up', self)
		upAction.setStatusTip('Up')
		upAction.triggered.connect(self.up)

		downAction = QtGui.QAction(QtGui.QIcon('down24.gif'), 'Down', self)
		downAction.setStatusTip('Down')
		downAction.triggered.connect(self.down)

		self.dpi = 150
		self.fig = Figure((5.0, 4.0), dpi=self.dpi)
		self.canvas = FigureCanvas(self.fig)
		self.canvas.setParent(self.main_frame)
		
		self.axes = self.fig.add_subplot(111)
        
		self.canvas.mpl_connect('pick_event', self.on_pick)
        
		self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)

		self.canvas.move(280,80)		
		self.mpl_toolbar.move(280,80)
		self.canvas.setVisible(False)
		self.mpl_toolbar.setVisible(False)
                
		toolbar = self.addToolBar('Exit')

		toolbar.setStyleSheet('QToolBar{spacing:10px;}')
		toolbar.addAction(openAction)
		toolbar.addSeparator()
		toolbar.addAction(tableAction)
		toolbar.addAction(graphAction)
		toolbar.addSeparator()		
		toolbar.addAction(refreshAction)
		toolbar.addAction(upAction)
		toolbar.addAction(downAction)
		toolbar.addSeparator()
		toolbar.addAction(exitAction)
		 
		self.textbox = QtGui.QLineEdit(self)
		self.textbox.resize(280,35)
		self.textbox.move(10, 70)

		self.btn = QPushButton('Apply', self)
		self.btn.setToolTip('Click to apply expression')
		self.btn.resize(self.btn.sizeHint())	
		self.btn.move(300, 73)		
		self.btn.clicked.connect(self.myapply)
		self.btn.setEnabled(False)

		self.tabledata = [()]

		self.header = ["  IP address  ","  Date and time  ","  Request Method  ","  Status code  ","  Number of bytes  ","  URL  "]
开发者ID:HimanshuPurandare,项目名称:Projects,代码行数:70,代码来源:WeblogAnalyzer.py


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