RE: Re: Plotting library for GTK+




-----Original Message-----
From: gtk-app-devel-list [mailto:gtk-app-devel-list-bounces gnome org] On
Behalf Of Allin Cottrell
Sent: Tuesday, December 02, 2014 10:51 AM
To: Sergei Naumov
Cc: gtk-app-devel-list gnome org
Subject: RE: Re: Plotting library for GTK+

On Tue, 2 Dec 2014, Sergei Naumov wrote:


I think this question was asked many times but googling gives a
rather
patchy
answer to it. So, I am writing a piece of C code that acquires some
data
from
hardware controllers and it also has to plot a few simple graphs
and >
histograms
out of them. What is a "canonical" tool for such a purpose?

I played a bit with GtkExtra but it seems that the project is
somewhat >
forgotten
and it does not have all the documentation in it. I also looked at
Cairo
but > it
is a low level library so I would have to implement all the
scaling,
axes, > ticks
and stuff myself. There are some interactive tools based on GTK but
I
need a
library, as I have to build in plotting functionality.

AFAIK there's no such library, unfortunately. However gnuplot is
perhaps the nearest thing to a "canonical" open-source plotting
program. It can be run quite effectively in "slave" mode and can
produce a wide variety of output formats (notably, using cairo and pango).

Gnuplot would be the best but it is an interactive program. It can
also produce all kinds of file formats. Are you suggesting to create
such files and display them in GTK application?

Yes, it's not the ideal solution (using a library would be cleaner) but it works
quite nicely. You can generate a plot in batch mode using gnuplot's pngcairo
"terminal" and load the PNG into a GTK window.

Allin Cottrell


I do the same thing with graphs created in a separate python program with matplotlib.

The information contained in this message is CONFIDENTIAL. It is intended only for the use of the individual 
or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are 
hereby notified that any dissemination or copying of this information is strictly prohibited. If you received 
this communication in error, please immediately notify the sender, and thereafter destroy any electronic 
copies of the message.


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