Re: Re: Problems with new plot widget
John Gotts <[email protected]> Wed, 12 Oct 2005 22:44:57 -0500
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
I think you'll find that axis_set_ticks() changes both the left and right axes while axis_set_ticks() only changes the specified axis for the top and bottom as it should. A part of my graph that looked correct was actually displaying the bug, because I invoked axis_set_ticks() twice yet three axes were correct. (The graph was initialized as (0..1, 0..1).) Thanks for the other information. It should polish up my graphs considerably. In message <[email protected]>, "Adrian E. Feiguin" writes: >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 b >ut >>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 speci >fy >>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 >_______________________________________________ >Scigraphica-gtkextra mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/scigraphica-gtkextra -- John GOTTS <[email protected]> http://linuxsavvy.com/staff/jgotts ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl