PDA

View Full Version : QwtPlot: how to auto-scale two Y scales?


paradiza
21st September 2007, 20:28
Hi guys,

I just tried Qwt for my 2D plots and it's really nice! However, there's some small issue I'm not able to figure out looking at the Qwt's docs:

When I have two Y-scales (left/right, for two curves) in one plot, the automatic linear scaling seems to combine the two data sets (curves) to determine the first Y-scale's range whilst the second Y-scale's range seems to be completely unrelated to the data...

Is there a nice way to use Qwt's scaling engine to auto-adjust the first Y-scale based on the first curve's data, and the second Y-scale based on the second curve's data? If so, does it also line up the major ticks on the left and right scale in order to share a common QwtPlotGrid?

Thanks,
para

Uwe
23rd September 2007, 11:18
Guess you attached both curves to xBottom/yLeft ?

Uwe

paradiza
23rd September 2007, 11:40
Yep, is there a way to attach a curve to an axis explicitly? :o

Edit: I guess you mean QwtPlotItem::setAxis(int xAxis, int yAxis)

Damn it,
para the blind :cool: