#include "qwt_plot.h"
#include "qwt_scale_div.h"
#include <QApplication>
int main(int argc, char ** argv) {
plot.setCanvasBackground(Qt::white);
QList<double>(),
QList<double>(),
QList<double>()
<< 10
<< 40
<< 90
};
// QwtScaleDiv pressScaleDiv;
// pressScaleDiv.setInterval(0, 100);
// pressScaleDiv.setTicks(
// QwtScaleDiv::MinorMajor,
// QList<double>()
// << 10
// << 40
// << 90
// );
plot.
setAxisScaleDiv(QwtPlot::yLeft, pressScaleDiv
);
plot.show();
return app.exec();
}
#include "qwt_plot.h"
#include "qwt_scale_div.h"
#include <QApplication>
int main(int argc, char ** argv) {
QApplication app(argc, argv);
QwtPlot plot;
plot.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
plot.setCanvasBackground(Qt::white);
QList<double> ticks[QwtScaleDiv::NTickTypes] = {
QList<double>(),
QList<double>(),
QList<double>()
<< 10
<< 40
<< 90
};
QwtScaleDiv pressScaleDiv(0, 100, ticks);
// QwtScaleDiv pressScaleDiv;
// pressScaleDiv.setInterval(0, 100);
// pressScaleDiv.setTicks(
// QwtScaleDiv::MinorMajor,
// QList<double>()
// << 10
// << 40
// << 90
// );
plot.setAxisScaleDiv(QwtPlot::yLeft, pressScaleDiv);
plot.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks