View Full Version : Plotting from Left to Right ??

3rd June 2008, 06:40
Hi friends, I have a small problem. I am working on a Qwt related project for plotting graphs.
I need the plotting to start from the left corner of the Qwt Plot Widget to the right . I checked the qwt example data_plot but they are generating values randomly and plotting.But i am actually acquiring data from a db and plotting but the plot happens right to left. How can i achieve this. ?

Thank You

3rd June 2008, 06:50
Invert the scale of your x-axis ( QwtScaleEngine::setAttribute( QwtScaleEngine::Inverted ) )


3rd June 2008, 07:28
Hi uwe thankx for the reply. !! :) But where do put this line. How do i use it. ( QwtScaleEngine::setAttribute( QwtScaleEngine::Inverted ) ) in the program.

myPlot->setTitle("Temperature Channel");
myPlot->setAxisTitle(QwtPlot::xBottom, "Time/seconds");
myPlot->setAxisScale(QwtPlot::xBottom, m_time, m_time + 100);

Thank You

3rd June 2008, 08:09
Take a look at QwtPlot (http://qwt.sourceforge.net/class_qwt_plot.html) docs. There is a method to get the axis scale engine.