|
From: Daniel J S. <dan...@ie...> - 2011-03-14 03:46:53
|
On 03/12/2011 01:09 PM, Daniel J Sebald wrote: > On 03/12/2011 12:36 PM, Ethan Merritt wrote: >> On Saturday, March 12, 2011, Daniel J Sebald wrote: >>> A second issue is that the left margin no longer works properly. Try >>> the 'key.dem' demo and it should be apparent. There are some other >>> demos where the plot edge for the left margin is not computed correctly. >> >> I haven't found any where the left margin of the plot itself is incorrect. >> The placement of the key box is non-obvious or incorrect in some of the >> examples. Not sure whether this is because it's mis-estimating to left >> margin or the font size or what. > > This issue is still present. It must have come about before 4.4. > > Check the example with "Key (out vert left top)" as a title of the > upper-left sub-plot. The key used to be outside the actual sub-plot, > but the sub-plot margin is too small. It should look like a mirror of > the example "Key (out vert right top)". I think it is this change: http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/src/graphics.c?r1=1.316&r2=1.317 specifically the green line added at the start of the diff list. I commented out that line and the key demo works as I remember. plot_bounds.xleft is adjusted to leave space for the key before the lines in this diff list. What was the above modification meant to address? Maybe there is some other way of doing this. Before the adjustment for the key, plot_bounds.xleft is set as follows: /*{{{ preliminary plot_bounds.xleft, needed for "under" */ if (lmargin.scalex == screen) plot_bounds.xleft = lmargin.x * (float)t->xmax; else plot_bounds.xleft = xoffset * t->xmax + t->h_char * (lmargin.x >= 0 ? lmargin.x : 1); /*}}} */ Perhaps plot_bounds.xleft = xoffset * t->xmax; should be grouped with the above code. E.g., if (lmargin.x < 0) plot_bounds.xleft = xoffset * t->xmax; elseif (lmargin.scalex == screen) plot_bounds.xleft = lmargin.x * (float)t->xmax; else plot_bounds.xleft = xoffset * t->xmax + t->h_char * (lmargin.x >= 0 ? lmargin.x : 1); Dan |