Re: plot data stream in realtime



Mind you - my suggestion below assumes that your original x and y pointers you used in the gtk_databox_points_new function are still the same as before. Note that the same applies for gtk_databox_lines_new.

Matt

On 11/12/2012 09:57 AM, Matt Flax wrote:
Can't you just use the function gtk_databox_xyc_graph_set_length to change the length ?

When you call gtk_databox_xyc_graph_set_length it also calls
g_object_notify (G_OBJECT (xyc_graph), "length");
which should re-draw.

Matt

On 11/12/2012 06:38 AM, Joaquín Ignacio Aramendía wrote:
Good point. We don't necessarily have to change the number of datapoints but "mute" a certain range at the very beginning of a run. The range is all that seems to be changing. Now the difference (and I'm not sure what the goal is) here is gtkdb pre-bounds the data ahead of time (to a max runlength) which prevents this from running unbound in time.

Should we modify gtkdatabox to have a fifo mode where data is dropped as new data comes in?

I was going to this issue when pointing the use of GArray for the data and add a *_push_point(x,y) method in the graph object. We can use the GArray functionality for growing arrays of points and take the lenght and other data at drawing time, not at creation time. Sounds reasonable? (Maybe add a configurable maximum length or sth)

Regards
Joaquín
_______________________________________________
gtkdatabox-list mailing list
gtkdatabox-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkdatabox-list

_______________________________________________
gtkdatabox-list mailing list
gtkdatabox-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkdatabox-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]