Re: Example that plots real-time data



That is a great example. I get roughly 250 Fps.

I compiled it with :
gcc `pkg-config --cflags gtkdatabox` realtime_example.c -o realtime_example `pkg-config --libs gtkdatabox`

The only thing I would add is changing the x-axis tick marks to match your actual time data.

You could use the following to do that :

gtk_databox_ruler_set_manual_tick_labels(ruler, your_labels);

There are other ways to change the tick labels I think....

Matt

On 11/13/2012 07:19 AM, Johannes Deutsch wrote:
Hi,

this post is related to the previously posted topic "plot data stream
in realtime".

Although this Email is related to "plot data stream
in realtime" it contains a fixed implementation of realtime data
visualization. Given that i think it should be discussed in it's own
thread.

In the meantime i wrote an example that illustrates a
real-time plotting of a sinus function. Both, the section of the
visible x-Axis and the period length of the plotted function can be
adjusted by the user via hscale widgets. I also added a FPS counter.

I would be very grateful if anybody of you experts take a look a the
code and tell me if my kind of programming style is suitable for
gtkdatabox.

Also i would like to know if the those GDK-Critical messages:

	(databox:12027): Gdk-CRITICAL **:
gdk_window_move_resize_internal: assertion `GDK_IS_WINDOW (window)'
failed

	(databox:12027): Gdk-CRITICAL **: _gdk_pixmap_new:
	assertion
`(drawable != NULL) || (depth != -1)' failed

should worry me!?


Thanks a lot for your time and with best regards

Johannes



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