RE: Help on first program
"MQ" <[email protected]> Thu, 14 Jul 2005 20:04:29 -0400
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
I'm not at work right now so I can't look at my code to give you pointers but I can give you an answer to #2: gtk_plot_data_draw_points(dataset, 1); If I recall correctly it draws the requested number of points. If you call gtk_plot_data_draw_points(dataset, 5) it will attempt to draw 5 more points from where it left off. This is useful when capturing data that might be produced at a higher rate. For example I have a simulation that runs at 60 Hz and if I wanted to draw the data every iteration I would call gtk_plot_data_draw_points(dataset, 1); but this can be a hog so instead I call gtk_plot_data_draw_points() only every 5 iterations and invoke it as gtk_plot_data_draw_points(dataset, 5); BTW, in my code gtk_plot_data_draw_points runs in a separate thread than the one producing the data. I can't remember what the names of the functions are for adding the labels to the axes, but if you open the header files (like gtkplot.h) you can see the list of available functions in gtkplot.c and you might be able to find it there. If not in that file try others. Hope this helps. -M > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of > [email protected] > Sent: Thursday, July 14, 2005 1:26 PM > To: [email protected] > Subject: [gtkextra] Help on first program > > > Hello. > > I am just trying to learn GtkPlot for drawing scientific > graphics. I am suffering with the lack of documentation, > especially for newcommers. > > Based on some of the test programs found on the > distribution, I have written my first program, attached > below. There are some pieces of code I did not > understand completly. I would like to > > 1. receive comments on this program, especially if > something is wrong or could be done better > > 2. understand the meaning of the second parameter of > the function call > > gtk_plot_data_draw_points(dataset, 1) > > 3. receive help on how to label and tip the bottom and left > axes > > Regards, > > Romildo > > --------------------- > WEBMAIL UBER INTERNET > ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click