PDA

View Full Version : qwt plot : i want to plot it from right to left



kulsekarr
16th December 2011, 18:10
hi,
i am new to qt i am using qwt plot library file in that wave form is plotted from left to right and i need it to plot from left to right.
please any one one help me.. it will be grateful to you. and my code is below


for (int i = 0; i< PLOT_SIZE; i++)
{
d_x[i] = 1 * i; // time axis
d_y[i] = 0;
d_z[i] = 0;
d_3[i] = 0;
}

// Insert new curves
QwtPlotCurve *cRight = new QwtPlotCurve("Channel 1");
cRight->attach(this);

// Set curve styles
cRight->setPen(QPen(Qt::green));

// Attach (don't copy) data. Both curves use the same x array.
cRight->setRawData(d_x, d_y, PLOT_SIZE);