kja
25th October 2010, 02:33
Hi,
I installed qwt-6.0.0-rc2.zip and have all the examples working with Visual Studio 2008, but I don't have qwt_data.h or qwt_data.cpp in my source files. does anyone know where I can get these files?
Thanks
Added after 17 minutes:
What I am trying to do is load some double time and double price data into a 2d graph. I want to use setRawData but I don't have the qwt_data files.
Is there another way to do this?
here is some of my code:
class newPlot : public QwtPlot{
public:
newPlot();
~newPlot(){}
};
newPlot::newPlot()
{
setTitle("Sunday Plot");
insertLegend(new QwtLegend(), QwtPlot::RightLegend);
setAxisTitle(xBottom, "Time");
setAxisScale(xBottom, 0.0, 100000.0);
setAxisTitle(yLeft, "Price");
setAxisScale(yLeft, 0.0, 1.0);
QwtPlotCurve *myCurve = new QwtPlotCurve("price over time");
myCurve->setPen(QPen(Qt::red));
myCurve->attach(this);
////some example data
double *tm= new double [1000];
double *pr= new double [1000];
for (int i=0; i<1000; i++){
tm[i] = i;
vvvll[i] = i+1;
}
myCurve->setRawData();
}
int main(int argc, char **argv)
{
QApplication a(argc, argv);
newPlot plot;
plot.resize(1000,400);
plot.show();
return a.exec();
}
I don't know what to do to get some data into myCurve
thanks.
I installed qwt-6.0.0-rc2.zip and have all the examples working with Visual Studio 2008, but I don't have qwt_data.h or qwt_data.cpp in my source files. does anyone know where I can get these files?
Thanks
Added after 17 minutes:
What I am trying to do is load some double time and double price data into a 2d graph. I want to use setRawData but I don't have the qwt_data files.
Is there another way to do this?
here is some of my code:
class newPlot : public QwtPlot{
public:
newPlot();
~newPlot(){}
};
newPlot::newPlot()
{
setTitle("Sunday Plot");
insertLegend(new QwtLegend(), QwtPlot::RightLegend);
setAxisTitle(xBottom, "Time");
setAxisScale(xBottom, 0.0, 100000.0);
setAxisTitle(yLeft, "Price");
setAxisScale(yLeft, 0.0, 1.0);
QwtPlotCurve *myCurve = new QwtPlotCurve("price over time");
myCurve->setPen(QPen(Qt::red));
myCurve->attach(this);
////some example data
double *tm= new double [1000];
double *pr= new double [1000];
for (int i=0; i<1000; i++){
tm[i] = i;
vvvll[i] = i+1;
}
myCurve->setRawData();
}
int main(int argc, char **argv)
{
QApplication a(argc, argv);
newPlot plot;
plot.resize(1000,400);
plot.show();
return a.exec();
}
I don't know what to do to get some data into myCurve
thanks.