PDA

View Full Version : how to get zoomer to replot



kja
13th November 2010, 01:22
Hi

I have a qwtplot that takes a large data file and only plots some of the points (like every 100th point), I want to be able to zoom into an area on the plot and have the data be reloaded so that more points are loaded in the zoomed in region (like maybe every 10th point). I think I might be able to do this if i could get the x-axes values of the beginning and end of the zoomed in area. Does anyone know a way that I could output the x-axis info from the zoom into my code to replot? Does the zoom store that information anywhere?

Or does anyone have any other ideas on how I might do this?

Thanks!

kja
15th November 2010, 21:27
Anyone have any ideas on how I could send the new x-axis values to a variable in my program so that I can load some more data points?

Maybe a special way to implement a zoomer so that when I choose a particular area to zoom the first and last points on the x-axis can be saved?

Thanks

FelixB
16th November 2010, 16:15
use "MyPlot->axisScaleDiv(QwtPlot::xBottom)->interval();" - you'll get a QwtDoubleInterval which contains the current minimum and maximum value of the selected axis

kja
17th November 2010, 07:15
Thanks a lot FelixB!