void BasicPlot::setAxes(double xmin, double xmax, double ymin, double ymax) { setAxisScale(xBottom, xmin, xmax); setAxisScale(yLeft, ymin, ymax); replot(); // set zoomer to new axes limits emit setNewBase(axisScaleDiv(QwtPlot::xBottom), axisScaleDiv(QwtPlot::yLeft)); }
void BasicPlot::setAxes(double xmin, double xmax, double ymin, double ymax) { setAxisScale(xBottom, xmin, xmax); setAxisScale(yLeft, ymin, ymax); replot(); // set zoomer to new axes limits QwtScaleDiv* bottom = new QwtScaleDiv; *bottom = axisScaleDiv(QwtPlot::xBottom); QwtScaleDiv* left = new QwtScaleDiv; *left = axisScaleDiv(QwtPlot::yLeft); // emit setNewBase(&axisScaleDiv(QwtPlot::xBottom), // &axisScaleDiv(QwtPlot::yLeft)); setNewBase(bottom, left); }