So, in the attached image the relationship would be:
PLOT COORDINATES
x=10
y=2.5
DATA COORDINATES
x=0
y=0
The squares could be just a simple 2D array of color, as in:
QColor shmoo[10][10];
shmoo [0][0] = QColor("red");
But, they could also be represented in another way, if that's easier.
My requirements are
1. Create a plot that looks like the attached
2. Allow the user to click on a specific square and, in plot coordinates, re-measure that point. So, in the example below, clicking anywhere inside the lower-left point would tell me to re-measure Freq(x)=10MHz, Voltage(y)=2.5V.
What is the best way to draw color squares in Qwt that accomplishes these two goals?
Thank you for your guidance Uwe.
image5224074054341222068.jpg
This can be done with a QwtPlotSpectrogram.The squares could be just a simple 2D array of color, ...
QwtMatrixRasterData in NearestNeighbur mode is close to what you want to do - see the rasterview example.
Using QwtPlotPicker you have the plot coordinates of each click.Allow the user to click on a specific square and, in plot coordinates, re-measure that point.
Uwe
Bookmarks