本文整理汇总了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 "]