PDA

View Full Version : qwt or GNU plot or other ... ?



didierB
20th July 2012, 05:12
Hello all,
I write because I like to know which library you use to plot your graphs usually in your programs. I do programs that calculations the evolution of different magnitude in time and I would like for each time step plot the results.
Basically to have a dynamic graph.

Previously I was using qwt but I'm no expert in this library and I saw a lot of disadvantages and I wonder if with other libraries is simpler.
(it might be just me who can not use it properly)

Here is the program I have (schematically):


while (i <iFinal)
{
calcul.run ();
graphique.plot ();
i ;
}


at each time step "i" I want to do a calculation and Live Display on my curve (without losing the points I have already drawn on the curve).


With qwt:
=> I had a lot of trouble with this library. First, to plot points without deleting the other i have for each time step "i" to plot all the results. Because, by default it updating the graph and delete everything else and keeps only the last point .
=> My second problem is also in the ease of use. perhaps we can use qwt QtDesigner but with me it don't works and i have to programm all the management of windows and qwt graphics... is difficult for a non informaticien like me

* GNU plot
I really do not know how it works and I like to have your opinion on this. D'after that I realized that reads text files and it draw a curve from two vectors (X and Y).

Can be plot in a real time ?

=> Thank you in advance for any information

ps : in reality, i want to plot a graphique like the attachment. By qwt i can but is very difficult without Qtdesigner
8025

ChrisW67
20th July 2012, 05:51
gnuplot is a command line plotting tool that takes a plot definition script and the raw data and produces graphs in various 2d and 3d formats. It could easily produce the graph grid you show from static data but it is not suited to real-time plotting.

Qwt has examples of dynamic plots that update as data arrives. There's also a Qwt sub-forum here that is frequented by the Qwt author and other with experience in using it.

didierB
23rd July 2012, 03:08
thanks for your answer !
=> to you have already made a coupling between a C++ code and GNU plot ? if yes, have you a simple exemple with to curve to show me ?

=> for Qwt it's a little difficult, can we use this with Qt designer ?