Re: GTK3 + gnuplot
- From: <cecashon aol com>
- To: arkkimede gmail com, gtk-app-devel-list gnome org
- Subject: Re: GTK3 + gnuplot
- Date: Tue, 18 Sep 2018 17:35:43 +0000 (UTC)
Hi Arkkimede,
With gnuplot you can output to a file and then open the file with GTK+.
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/Pipes/gnuplot5.c
At one time gnuplot could directly write to GTK but that was a possible security problem so it no longer
works to do this.
Gnuplot has 3d graphing plots and I think that it does this with cairo. You can graph in 3d with cairo but
you need to do a few extra calculations before drawing with cairo. The Graphene library has a number of
functions that are very helpful for drawing in 3d. It is part of GTK4 but you can use it in GTK3.
https://developer.gnome.org/graphene/stable/ch01.html
Another option is to write your own helper functions for drawing with cairo in 3d.
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/perspective3.c
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/perspective4.c
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/shadow1.c
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/shadow2.c
https://gitlab.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/spring2.c
So options abound for putting together a 3d plotting widget in GTK.
Eric
-----Original Message-----
From: arkkimede via gtk-app-devel-list <gtk-app-devel-list gnome org>
To: gtk-app-devel-list list <gtk-app-devel-list gnome org>
Sent: Tue, Sep 18, 2018 9:20 am
Subject: GTK3 + gnuplot
Hi!
I've developed an application in c to make measurements, with a GUI that
manage the inputs and it is able to produce graphical results in terms of
2d plots, realized by mean of the library Cairo.
Now I have the necessity to produce 3d plots (3d radiation pattern of
antennas).
To realize 3d plots by mean of a 2d library, is not impossible but very
hard.
A solution could be using gnuplot that I'he yet used to produce high
quality 3d plots.
The question now is: "How to embed a gnuplot graphic in gtk3?
Could you say, please, where to find a simple example, just to undestand
how it is possible to do that?
Thank you
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]