Hi,
Anyone have any idea why my zoomer zooms fine until I try to zoom into the area on the far right of the qwtplot?
It seems to work fine on the first 3/4 of my plot (from left to right), but when I zoom on my curve on the far right side of my plot it returns a blank area that is farther down the x axis than the area I selected.
any ideas?
{
public:
{
setTrackerMode(ActiveOnly);
}
};
{
CurveAttrib ** curves;
public:
MyPlot(){
myZoomer
[0] = new MyZoomer
(QwtPlot::xBottom,
QwtPlot::yLeft, this
->canvas
());
myZoomer
[1] = new MyZoomer
(QwtPlot::xBottom,
QwtPlot::yRight, this
->canvas
());
}
MyZoomer *myZoomer[2];
void plotMyPlot(){
....
myZoomer[0]->setZoomBase();
myZoomer[1]->setZoomBase();
this->setAxisAutoScale(yLeft);
this->setAxisAutoScale(yRight);
this->setAxisAutoScale(xBottom);
}
};
#endif
class MyZoomer : public QwtPlotZoomer
{
public:
MyZoomer(int xAxis, int yAxis, QwtPlotCanvas *canvas):
QwtPlotZoomer(xAxis, yAxis, canvas)
{
setTrackerMode(ActiveOnly);
}
};
class MyPlot : public QwtPlot
{
CurveAttrib ** curves;
public:
MyPlot(){
myZoomer[0] = new MyZoomer(QwtPlot::xBottom, QwtPlot::yLeft, this->canvas());
myZoomer[1] = new MyZoomer(QwtPlot::xBottom, QwtPlot::yRight, this->canvas());
enableAxis(QwtPlot::yRight);
}
MyZoomer *myZoomer[2];
void plotMyPlot(){
....
myZoomer[0]->setZoomBase();
myZoomer[1]->setZoomBase();
this->setAxisAutoScale(yLeft);
this->setAxisAutoScale(yRight);
this->setAxisAutoScale(xBottom);
}
};
#endif
To copy to clipboard, switch view to plain text mode
I'm not doing very fancy stuff with my zoomer but I know it has to be in my code because if I use a QwtPlotZoomer zoomer = new QwtPlotZoomer it works just fine
Thanks
Bookmarks