Yes, GtkPlot again :)

From: Date: Wed, 18 Feb 2004 22:54:22 +0000
Subject: Yes, GtkPlot again :)
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4405@lists.php.net to get a copy of this message
Hi ! yet another problem with GtkPlot. I successfully created a gradient (which is shown in the legend) but I cannot get it to work (I mean, i saw that a gradient was intented to change a symbol's color depending on its value). Here is my code ($cos is my GtkPlotData) : $cos->set_gradient(-1, 1, 10, 10); /*what is the fourth parameter ? never seen it in other docs*/ $cos->set_gradient_colors(gdk::color_parse("yellow"), gdk::color_parse("red")); $cos->gradient_set_visible(true); $cos->gradient_autoscale_z(); /* those three autoscale, is it useful ? */ $cos->gradient_autoscale_a(); $cos->gradient_autoscale_da(); $cos->set_legend_precision(1); (it is a cos(x) function so it goes from -1 to 1). Here everything works as expected, but when I call $cos->draw_gradient(): first I don't know which parameters I should give it, and then I get an error : CRITICAL... etc.. etc.. assertion GTK_WIDGET_REALIZED<data->plot> failed. I only have one GtkWindow, and I called realize(); on it, that's all. Does anyone have an idea ? (big silence in the room... :) Thanx a lot ! Bye, Jonathan

« previous php.gtk.general (#4405) next »