Yes I have implemented my own QwtSeriesData and overridden the boundingRect(). For my raw data I set the bounding rectable to be fixed at the sample range of my data, for example 12 bit data ranges over -2048 to +2047, even if the data is smaller. This just stops the plot axises from varying when the data magnitude changes, someting which looks better when you are repeatedly replotting variable data. The x-axis range for my data I set to be simply the number of sample, say 1024, which works fine for raw data.
The FFT data's bounding box can be similarly optimised without calculating the min and max ranges. Again though the x-axis is just the calculated data index, this being the FFT bin. To plot the FFT data against frequency however I need to plot from say 0Hz to 500MHz as opposed to 0 to 1023 for the FFT bin. That is each bin equates to 488kHz.
If I modify the bounding rectangle should I report the rectangle as 0-500MHz on the x-axis then? If I do that will the plot widget not request display points from 0 to 500,000,000 as opposed to 0-1023? Or am I missing something here?
I can see for scaling say my y-axis data, which I need to do with the raw data at some point to display input signal range in mVolts as opposed to sample value, by simply getting my series data class to return the point at the requested index modified on the fly my the conversion factor from sample value to mV. I don't understand how this an be done for the x-axis data, hence I thought I could simply modify how the x-axis is scaled or transformed.
What is the linear scale engine and transform engine classes for then on the axis?
Cheers
Bookmarks