Re: plot data stream in realtime



Johannes,

I can confirm what Brian writes ... I have used gtkdatabox to update that frequently and I think his application (brp-pacu) does some updating in semi-real time.
The nice thing about gtkdatabox is that you set the pointers to your x/y data once and their element size and you only need to 'refresh' to update the plot ... really fast and nifty. This is how to do a refresh (axis is the thing you need to refresh) :
gtk_widget_queue_draw (GTK_WIDGET (axis));

Further you can copy the zoom functionality and apply it to sliders which are logarithmically stepped ... that shouldn't be a problem.

If you want to change the size of the vector you are plotting, you will re-call the function which sets up the pointers and the size. Look at this page in the documentation :
api/html/gtkdatabox__lines_8h.html#ae54c4690b9bb71b079196b370995a394

Matt

On 11/11/2012 06:34 PM, Brian Phelps wrote:
I have never tried this but you could do something similar to what the lisajous example does (update the data every 50 msecs or so) and also update the range too.

So update the X data range when you update the data every 50-100msecs and this should work fine.  If you would like to submit an example we could also include it in the demo.

In theory gtkdatabox should not have a problem doing this but I have not tried it in a situatoin like this.
----

Sent using Manchester encoded voltage pulses over a link to form packets which contain other higher level packets along with this message and signature which also contains the IP address to the destination and passing through many router links which may queue the packets at different amounts and possibly arrive out of order only to be reordered by the TCP/IP stack in the kernel of the recipient's server and displayed by a program running in userspace on the device you are currently looking at.



On Sun, Nov 11, 2012 at 12:53 PM, Johannes Deutsch <j_deutsch web de> wrote:
Hi all,

i'm learning gtk since recently and discovered gtkdatabox which seems to
be suited to integrate in my project (a tool to log the step response
of a system). So i'm very new to gtkdatabox and just studying the
examples.

Unfortunately using the examples i can't figure out if the kind of
application i am going to create is actually feasible with gtkdatabox.

I want to plot a data stream (stepresponse sourced by a fast DAC) in
real time similarly like gnuplot does it in the following video:

        http://www.youtube.com/watch?v=SoF81jc9tDo

Unlike this video shows, the user should be able to scroll back to
regions of previously logged data.

In terms of gtkdatabox i would like to dynamically increase the
interval between the left- and right-limits of the databox while the
size of the zoomed selection should remain constant. This has the
effect, that the scrollbar gradually decrease with remaining time while
permanently aligned at the left corner of the widget (as long as the
user does not scroll).

So far i can't find a function which zooms to a section of the graph. A
function which does just the same what a user can achieve with dragging
the mouse and click inside the selection. Does this function or a
similar function exist? Or is there another way to achieve this?

Also i would like to know how gtkdatabox handles a dynamically
increased datasets!?

I hope some of you experts can help me to answer my questions?

Thanks a lot for your effort and with best regards

Johannes
_______________________________________________
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]