Re: Re: Problems with new plot widget
"Adrian E. Feiguin" <[email protected]> Tue, 11 Oct 2005 03:28:09 -0700
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
Hi John! John Gotts wrote: >In message <[email protected]>, "Adrian E. Feiguin" writes: > > > >>Sorry, sorry, I didn't read your mail carefully. Actually, I replced >>those values in testgtkplot.c in gtkextra-1.0.0, and everything works as >>expected. Try it out, and see if you can reproduce it using testgtkplot. >>I'm guessing that you may be using the wrong arguments. >> >> > >I figured out what I did. I used gtk_plot_axis_set_ticks() instead of >gtk_plot_set_ticks(). gtk_plot_axis_set_ticks() worked fine for the y axis but >resulted in that bug for the x axis. I'm not getting what the difference >between the functions is, and whether gtk_plot_axis_set_ticks() should be a >private method. > > > I'm glad you found the problem. gtk_plot_set_ticks sets the axes ticks for both axes, while axis_set_ticks only for the axis in the argument. GtkPlotAxis is an object with its methods, and if you change a global property, the plot takes care of all the corresponding axes involved. >Also, could you explain the floating point arguments to >gtk_plot_canvas_put_child()? My assumption is that they are the percentage >starting and ending points for the graph, without taking the axis labels or >ticks into consideration. > > > That's correct, they are in percentage of the canvas page size. >Finally, our graphs would look better if we could leave all four axes painted >but only display ticks for the left-hand and bottom axes. I didn't see a way >of displaying axes but not ticks. Also, it would be nice to be able to specify >a printf()-style format string for the ticks. Our graphs display units of >currency, which as you know are normally demoninated in hundredths (Euro >cents). > > > You have to use gtk_plot_axis_show_ticks and _show_labels. the mask can be one or combitations of GTK_PLOT_TICKS_NONE, IN, OUT Good luck. Saludos, <ADRIAN> >John > > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl