PDA

View Full Version : Reg multiple plots in Qwt



Tavit
17th June 2008, 15:54
Hi friends,
I am acquire the data from hardware unit and saving into SQLITE database. I have So many fields in each record .I Identified and saved into relational database.I am able to retrieve and plot for one single field right now,i.e one curve. But how do i retrieve and plot for many fields, say for example 45 fields. I want to plot all the curves simultaneously in window with four qwt plot widgets.

This is the code i am using right now to retrieve for one channel and plot the curve for it.



QSqlQuery q1("SELECT Time_Interval, Channel_2 FROM Plotting_data1 ORDER BY CAST (Time_Interval AS INTEGER) LIMIT 60");
vx.clear();
vy.clear();
if(q1.exec())
{
if (q1.first())
{
do
{
vx.push_back(q1.value(0).toDouble());
vy.push_back(q1.value(1).toDouble());
} while(q1.next());
}
if (vx.count() <= 0)
return;

if (! newcurve)
{
newcurve= new QwtPlotCurve();
newcurve->attach(qwtPlot);
}
newcurve->setData(vx.data(), vy.data(), vx.count());
newcurve->setPen(QPen(Qt::blue));
myPlot->replot();

Thank you...

Regards,
Tavit.

Tavit
18th June 2008, 08:18
Hi i am sorry i posted qwt related post here by mistake. So i have posted this again in QWT sub forum. !!
I din't know how to delete this thread from here

jpn
18th June 2008, 11:26
{ two threads merged }


Hi i am sorry i posted qwt related post here by mistake. So i have posted this again in QWT sub forum. !!
I din't know how to delete this thread from here
Next time please notify the moderators to move the thread to the correct subforum instead of starting a new thread.

Tavit
18th June 2008, 11:47
Ok Jpn i will do it from the next time. I by mistake posted a qwt related question in the General programming forum. I din't know how to delete it from there so i wrote that message. From next time in case i go wrong i will request the Moderator to move it.


Thank You.

Tavit
23rd June 2008, 14:43
Hi guys.
I am stuck with this problem... can you help any body...

Thank you ...



Regards,
Tavit..