Closed 1PYTHON1 closed 4 years ago
import qwt import numpy as np
app = qwt.qt.QtGui.QApplication([])
plot = qwt.QwtPlot("Trigonometric functions") plot.insertLegend(qwt.QwtLegend(), qwt.QwtPlot.BottomLegend)
x = np.linspace(-10, 10, 500) qwt.QwtPlotCurve.make(x, np.cos(x), "Cosinus", plot, linecolor="red", antialiased=True) qwt.QwtPlotCurve.make(x, np.sin(x), "Sinus", plot, linecolor="blue", antialiased=True)
plot.resize(600, 300) plot.show() app.exec_()
Hi, What version of PythonQwt have you installed?
My bad... forgot to update the simple plot example in documentation following V0.8.0 (i.e. when I switched from an internal Qt-compatibility layer to the QtPy library, thus changing all the Qt-related imports).
Fixed in V0.8.3 just released.
I have version 0.8.0 installed, now I will update it, thanks for answering.
app = qwt.qt.QtGui.QApplication([]) AttributeError: module 'qwt' has no attribute 'qt'