Hello,
I plot data with QwtPlot and QwtPlotCurve and Iwant to zoom in this Plots with QwtPlorZoomer.
Now I made it like this:
theta_punkt_title.setText("<font>Nutationsgeschwin digkeit Θ'</font>");
theta_punkt_title.setFont(QFont("Helvetica", 10));
theta_punkt_curve = new QwtPlotCurve;
theta_punkt_curve->setPen(QPen(Qt::red,1));
theta_punkt_curve->setStyle(QwtPlotCurve::Lines);
theta_punkt_curve->setRenderHint(QwtPlotItem::RenderAntialiased);
theta_punkt_plot.setCanvasBackground(QColor(Qt::wh ite));
theta_punkt_plot.setTitle(theta_punkt_title);
theta_punkt_plot.setMaximumSize(400,300);
theta_punkt_plot.setAutoReplot(true);
theta_punkt_plot.resize(300,400);
line_theta_punkt = new QwtPlotMarker();
line_theta_punkt->setLineStyle(QwtPlotMarker::VLine);
line_theta_punkt->setLinePen(QPen(Qt::black));
theta_punkt_curve->setSamples(time_werte, theta_punkt_werte, size_array);
theta_punkt_curve->attach(&theta_punkt_plot);
theta_punkt_plot.setAxisAutoScale(theta_punkt_plot .xBottom, true);
theta_punkt_plot.setAxisAutoScale(theta_punkt_plot .yLeft, true);
theta_punkt_zoomer = new QwtPlotZoomer( theta_punkt_plot.canvas() );
theta_punkt_zoomer->setRubberBandPen( QColor( Qt::black ) );
theta_punkt_zoomer->setTrackerPen( QColor( Qt::black ) );
theta_punkt_zoomer->setMousePattern( QwtEventPattern::MouseSelect2, Qt::RightButton, Qt::ControlModifier );
theta_punkt_zoomer->setMousePattern( QwtEventPattern::MouseSelect3, Qt::RightButton );
When I plot it like this it work fine, but when I manipulate the data of the plot it plots it correctly.
But when I zoom in the new plot and then zoom out it goes to the scales of the first plot.
For example, when my plot goes over a time of 3 seconds and I replot over a time of 6s and I zoom in the second plot, the scales go to 3s by zooming out.
How can I fix it?
I hope you can uderstand my problem.
Christoph
Bookmarks