13,039
回編集
| 41行目: | 41行目: | ||
class | 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( | 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) | ||
window = MainWindow() | |||
sys.exit(app.exec_()) | sys.exit(app.exec_()) | ||
</source> | </source> | ||