The code where I set the data to the cruve is :
liste_courbe->append(curve);
myPlot
= new QwtPlot("XXXXX",
this);
mainLayout->addWidget(myPlot);
this->setLayout(mainLayout);
for(int k=0; k<nbParam; k++)
{
QList<QByteArray> liste_SL2;
QList<QByteArray> liste_val;
....
nbValeur = liste_SL2.size()-1;
QVector<double> x;
QVector<double> y;
for (int i=0; i<nbValeur; i++)
{
double newX = liste_SL2.at(i).toDouble();
double newY = liste_val.at(i).toDouble();
if(x.contains(newX))
{
if(!y.contains(newY))
{
x.append(newX);
y.append(newY);
}
}
else
{
x.append(newX);
y.append(newY);
}
liste_courbe->at(k)->setData(x.data(), y.date(), x.size());
liste_courbe->at(k)->attach(myPlot);
}
liste_courbe->append(curve);
myPlot = new QwtPlot("XXXXX",this);
mainLayout->addWidget(myPlot);
this->setLayout(mainLayout);
for(int k=0; k<nbParam; k++)
{
QList<QByteArray> liste_SL2;
QList<QByteArray> liste_val;
....
nbValeur = liste_SL2.size()-1;
QVector<double> x;
QVector<double> y;
for (int i=0; i<nbValeur; i++)
{
double newX = liste_SL2.at(i).toDouble();
double newY = liste_val.at(i).toDouble();
if(x.contains(newX))
{
if(!y.contains(newY))
{
x.append(newX);
y.append(newY);
}
}
else
{
x.append(newX);
y.append(newY);
}
liste_courbe->at(k)->setData(x.data(), y.date(), x.size());
liste_courbe->at(k)->attach(myPlot);
}
To copy to clipboard, switch view to plain text mode
btw: this forum has a subforum especially for qwt, I suggest to put your qwt-related questions there next time
Ok sorry, I'll post to the subforum next
Bookmarks