hello Felix
1°) my curve it's here:
http://imageshack.us/photo/my-images/339/curvei.jpg/
2°) i have tested without modify Qpen and it don't change anything
3°) i define style in the constructor and i use replot only in a method of my class "window". I just have tested replot in the constructor and it don't change anything
==> this is my real definition of curves in constructor:
for ( int k = 0 ; k < NombrePrecipitesSimules ; ++k )
{
mycurve[0+k*nombreDoublePlot]->attach( myPlot1 );
mycurve
[0+k
*nombreDoublePlot
]->setStyle
( QwtPlotCurve::Dots );
//mycurve[0+k*nombreDoublePlot]->setPen( QPen( Qt::blue, 0.1 ) );
mycurve[1+k*nombreDoublePlot]->attach( myPlot2 );
mycurve
[1+k
*nombreDoublePlot
]->setStyle
( QwtPlotCurve::Dots );
//mycurve[1+k*nombreDoublePlot]->setPen( QPen( Qt::blue, 0.1 ) );
}
myPlot1 = new QwtPlot();
myPlot2 = new QwtPlot();
for ( int k = 0 ; k < NombrePrecipitesSimules ; ++k )
{
mycurve[0+k*nombreDoublePlot]->attach( myPlot1 );
mycurve[0+k*nombreDoublePlot]->setStyle( QwtPlotCurve::Dots );
//mycurve[0+k*nombreDoublePlot]->setPen( QPen( Qt::blue, 0.1 ) );
mycurve[1+k*nombreDoublePlot]->attach( myPlot2 );
mycurve[1+k*nombreDoublePlot]->setStyle( QwtPlotCurve::Dots );
//mycurve[1+k*nombreDoublePlot]->setPen( QPen( Qt::blue, 0.1 ) );
}
To copy to clipboard, switch view to plain text mode
this is private attribut of my class:
QwtPlot *myPlot1;
QwtPlot *myPlot2;
QVector< QwtPlotCurve* > mycurve;
To copy to clipboard, switch view to plain text mode
and this is my utilisation:
for (int i=0;i<nb;i++)
{
int timeNb3=0;
timeNb3=Points3_OneXtwoY[i].size();
QVector<double> x3(0);
QVector<double> y3(0);
x3.reserve(timeNb3);
y3.reserve(timeNb3);
//i fill Qvectors
for (int z=0;z<timeNb3;z++)
{
x3 << Points3_OneXtwoY[i][z][0] ;
y3 << Points3_OneXtwoY[i][z][1] ;
}
mycurve[2+i*nombreDoublePlot]->setSamples(x3.data(),y3.data(),x3.size());
myPlot3->replot();
repaint();
for (int i=0;i<nb;i++)
{
int timeNb3=0;
timeNb3=Points3_OneXtwoY[i].size();
QVector<double> x3(0);
QVector<double> y3(0);
x3.reserve(timeNb3);
y3.reserve(timeNb3);
//i fill Qvectors
for (int z=0;z<timeNb3;z++)
{
x3 << Points3_OneXtwoY[i][z][0] ;
y3 << Points3_OneXtwoY[i][z][1] ;
}
mycurve[2+i*nombreDoublePlot]->setSamples(x3.data(),y3.data(),x3.size());
myPlot3->replot();
repaint();
To copy to clipboard, switch view to plain text mode
with: Points3_OneXtwoY a " vector<vector<vector<double>>> "
Bookmarks