GtkPlot widget
| From: | Jonathan Protzenko | Date: | Tue, 13 Jan 2004 20:13:09 +0000 |
| Subject: | GtkPlot widget | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4357@lists.php.net to get a copy of this message | ||
Hi all,
I'm currently trying to use the undocumented widget GtkPlot which seems
very useful. I managed to add points, set line style, etc.. but I miss a
few points which I think you might be able to tell me (I've found a lot
of things in the examples and in the gtkextramm code, but it is really
undocumented).
First of all,
$data->set_points(
array(0, .1, .2, .3, .4,),
array(.1, .2, .3, .25, .4),
array(1, 1, 1, 1, 1),
array(1, 1, 1, 1, 1),
5); //coords
I couldn't figure out what were the third and fourth arrays : if I
change the values it doesn't affect the graphics but if I set null
values, I get a warning.
Another big problem is the range of the graphic. When it goes from 0 to
1 I do not get any problems with the legends, but if I try that :
$plot->set_range(0, 10, 0, 10);
the numbers on the axes are so close to each other that they turn into a
black line... very ugly ! I tried $canvas->grid_set_step(2); which I
supposed to be able to solve my problem, but it didn't change anything.
I also find a reference to $plot->set_xscale(); in the gtkextramm
documentation but it is not implemented.
Last thing is the constants like GTK_PLOT_LINE_SOLID. I only found this
one, but I suppose there are other ones, do you know where I could find
a list ? It is the same problem with GTK_PLOT_SYMBOL_DIAMOND and
GTK_PLOT_SYMBOL_OPAQUE...
Thanks :)
Bye, Jonathan