Thanks a lot, it works !
I have redefine :
void MyPlotCurve
::draw (QPainter* painter,
const QwtScaleMap
& xMap,
const QwtScaleMap
& yMap,
int from,
int to
) const {
newYMap.setScaleInterval (minYValue (), maxYValue ());
}
void MyPlotCurve::draw (QPainter* painter, const QwtScaleMap& xMap, const QwtScaleMap& yMap, int from, int to) const
{
QwtScaleMap newYMap (yMap);
newYMap.setScaleInterval (minYValue (), maxYValue ());
QwtPlotCurve::draw (painter, xMap, newYMap, from, to);
}
To copy to clipboard, switch view to plain text mode
and for each of my curves I do
myCurve
->setItemAttribute
(QwtPlotItem::AutoScale,
false)
myCurve->setItemAttribute (QwtPlotItem::AutoScale, false)
To copy to clipboard, switch view to plain text mode
next, each time I want to change the grading to correspond to a curve, I just do
myPlot
->setAxisScale
(QwtPlot::yLeft, myCurve
->minYValue
(), myCurve
->maxYValue
())
myPlot->setAxisScale (QwtPlot::yLeft, myCurve->minYValue (), myCurve->maxYValue ())
To copy to clipboard, switch view to plain text mode
Bookmarks