「PyQtの基礎 - グラフ」の版間の差分

ナビゲーションに移動 検索に移動
41行目: 41行目:
   
   
   
   
  class App(QMainWindow):
  class MainWindow(QMainWindow):
   
   
     def __init__(self):
     def __init__(self):
83行目: 83行目:
         ax  = self.figure.add_subplot(111)
         ax  = self.figure.add_subplot(111)
         ax.plot(data, 'r-')
         ax.plot(data, 'r-')
         ax.set_title('PyQt Matplotlib Example')
         ax.set_title("PyQt Matplotlib Example")
         self.draw()
         self.draw()
   
   
89行目: 89行目:
  if __name__ == '__main__':
  if __name__ == '__main__':
     app = QApplication(sys.argv)
     app = QApplication(sys.argv)
     ex = App()
     window = MainWindow()
     sys.exit(app.exec_())
     sys.exit(app.exec_())
  </source>
  </source>

案内メニュー