|
From: Ethan M. <merritt@u.washington.edu> - 2007-06-28 16:40:29
|
Petr Mikulik commented: >> (*) There is a strange thing/bug: >> unset grid >> plot ... volatile >> Now zoom several times, hit "g" for grid on, then hit "u" for >> unzoom => grid is lost. This does not happen with "u" in the >> other usage of the plot command. >> Yes. This is because the grid settings are stored as part of the individual axis structures. In the new "refresh" mode, when you "unzoom" the original axis settings are restored, which includes the old grid settings. By contrast, when you do a full "replot" command the axis structures are filled in all over again rather than being re-used. If this is a problem, I suggest that the proper answer is to move the grid settings out of (struct axis) into a new self-contained structure. I may be overlooking something, but I don't see why the grid needs to be a property of the axis at all. It should be sufficient to define two bitfields for toggling axis tics on/off. For example: extern int grid_majortics, grid_minortics; /* Set major but not minor tics for the y2 axis */ grid_majortics &= 1 << SECOND_Y_AXIS; grid_minortics |= ~(1 << SECOND_Y_AXIS); On Tuesday 19 June 2007 14:58, Daniel J Farrell wrote: > I would be interested in started developing for gnuplot, but find > where to start a bit daunting. Maybe some mentoring of new developers > with simple targets might be a good idea. Is there some sort of > 'introduction to gnuplot dev' docs? So here is a nice self-contained project you could start off with. - Remove the TBOOLEANs gridmajor and gridminor from the definition of struct axis in axis.h - Define the new bitfields, also in axis.h - Convert existing references from the old mechanism to the new - Check whether initialization of the new bitfields needs to be done in places like "reset". -- Ethan A Merritt |