#include <qapplication.h>
#include <qwt_plot.h>
#include <qwt_symbol.h>
#include <qwt_plot_curve.h>
{
public:
Plot();
~Plot();
private:
};
{
double x[5]={25.0, 32.0, 45.0, 68.0, 91.0};
double y[5]={25.0, 32.0, 45.0, 68.0, 91.0};
this->setAxisScale(xBottom,0.0, 150.0);
this->setAxisScale(yLeft,0.0, 150.0);
this->Curve->setRawSamples(x, y, 5);
this
->Curve
->setPen
(QPen(Qt
::red));
this->Curve->attach(this);
}
Plot::~Plot()
{
delete Curve;
}
int main(int argc, char **argv)
{
Plot *p=new Plot();
p->show();
return a.exec();
}