QApplication& appref = app;
window.setWindowTitle("...");
dataPlot.
setAxisTitle( QwtPlot::xBottom,
"time" );
dataPlot.
setAxisTitle( QwtPlot::yLeft,
"data" );
QwtPlotRescaler dataPlotRescaler(dataPlot.canvas());
dataPlotRescaler.
setReferenceAxis(QwtPlot::xBottom);
dataPlotRescaler.
setAspectRatio(QwtPlot::yLeft,
1.0);
dataPlotRescaler.
setAspectRatio(QwtPlot::yRight,
0.0);
dataPlotRescaler.
setAspectRatio(QwtPlot::xTop,
0.0);
window.connect(&dataPlot, SIGNAL(resized(double, double)), SLOT(showRatio(double, double)));
Data data(d);
pc.setData(data);
pc.attach(&dataPlot);
dataPlot.replot();
window.show();
appref.exec();
QApplication& appref = app;
QWidget window;
window.setWindowTitle("...");
QwtPlot dataPlot(QwtText("..."), &window);
dataPlot.setAxisTitle( QwtPlot::xBottom, "time" );
dataPlot.setAxisTitle( QwtPlot::yLeft, "data" );
QwtPlotRescaler dataPlotRescaler(dataPlot.canvas());
dataPlotRescaler.setReferenceAxis(QwtPlot::xBottom);
dataPlotRescaler.setAspectRatio(QwtPlot::yLeft, 1.0);
dataPlotRescaler.setAspectRatio(QwtPlot::yRight, 0.0);
dataPlotRescaler.setAspectRatio(QwtPlot::xTop, 0.0);
window.connect(&dataPlot, SIGNAL(resized(double, double)), SLOT(showRatio(double, double)));
QwtPlotCurve pc;
Data data(d);
pc.setData(data);
pc.attach(&dataPlot);
dataPlot.replot();
window.show();
appref.exec();
To copy to clipboard, switch view to plain text mode
This is taken from
Bookmarks