Re: Trouble with GtkPlot

[email protected] Fri, 7 Dec 2007 19:17:31 +0000
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
On Dec 6, 2007 9:43 AM, Dan H <[email protected]> wrote:
> currently I'm stumped by GtkPlot. Essentially I stripped down the
> "testgtkplot" example and embedded it into my application, but under
> most circumstances I can't get any graph to show up (the axes come
> up, just no data). What's funny is that if I pack all the canvas,

Hi Dan, I've been meaning to write you a reply but been snowed under
with work :(

You're missing calls to gtk_plot_paint(), I think. The GtkPlot widget
is a little non-standard and needs a few extra functions to handle
resize and repaint.

You're welcome to steal code from (this part of) my app if you like.
This makes a gtkplot preview which you can embed in another widget:

http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/plotview.c?view=markup

And this is a floating window showing a plot:

http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/plotwindow.c?view=markup

Screenshot here:

http://www.vips.ecs.soton.ac.uk/images/Screenshot-nip2-7.12.2.png

John

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php