the simplest way, but not the cleanest, specially if you want to use markers or cursors, is to rescale internally the x-values to get the same range for both datasets.
So assuming you 1. dataset would have the values (x, y): (1000, 12), (2120, 15) ... (10000, 7)
and the 2. dataset values (1, 6), (2.5, 14) ... (10, 8)
rescale the 2. dataset to (1000, 6), (2500, 14) ... (10000, 8)
Another equivalent way is to change the conversion factor from physical units into pixels on the canvas.
In both cases, you might draw 2 different x-axis.
Did you take a look at Qwt?
If Qwt is too heavy for your need, take a look at KplotWidget from KDE. There are only very few changes to made to get it running on Qt.
Alain




Reply With Quote

Bookmarks