|
From: Daniel J S. <dan...@ie...> - 2011-03-12 10:10:38
|
I grabbed the most recent version of the SourceForge gnuplot tree via
tar-ball. It has directory names with "4.5", but upon compiling and
running, I see "4.4":
G N U P L O T
Version 4.4 patchlevel 0
last modified March 2010
System: Linux 2.6.35.11-83.fc14.i686
Anyway, the autoscale.dem demo is failing:
gnuplot> load 'autoscale.dem'
gnuplot> set yrange [*<-5:5<*]
^
"autoscale.dem", line 23: ':' or keyword 'to' expected
Is there a new feature that needs to be selectively compiled into
gnuplot? If so, didn't we have some way now of conditioning code inside
the demos?
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.
Dan
|
|
From: Ethan M. <merritt@u.washington.edu> - 2011-03-12 18:37:10
|
On Saturday, March 12, 2011, Daniel J Sebald wrote: > I grabbed the most recent version of the SourceForge gnuplot tree via > tar-ball. From where? We provide no such tarball. > It has directory names with "4.5", but upon compiling and > running, I see "4.4": > > G N U P L O T > Version 4.4 patchlevel 0 > last modified March 2010 > System: Linux 2.6.35.11-83.fc14.i686 > > Anyway, the autoscale.dem demo is failing: > > gnuplot> load 'autoscale.dem' > > gnuplot> set yrange [*<-5:5<*] That is a new syntax from 4.5, but it seems you are running some [perhaps modified] variant of version 4.4 > 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. Ethan |
|
From: Daniel J S. <dan...@ie...> - 2011-03-12 19:09:45
|
On 03/12/2011 12:36 PM, Ethan Merritt wrote: > On Saturday, March 12, 2011, Daniel J Sebald wrote: >> I grabbed the most recent version of the SourceForge gnuplot tree via >> tar-ball. > >> From where? > We provide no such tarball. It's part of SourceForge, isn't it? At least I think that is what the "Download GNU tarball" feature of SourceForge is supposed to be: http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/ It seems to bundle all the files for the user. If I followed the discussion of a couple months ago correctly, SourceForge is no longer supporting CVS. (All the commands that I've tried aren't working.) >> It has directory names with "4.5", but upon compiling and >> running, I see "4.4": >> >> G N U P L O T >> Version 4.4 patchlevel 0 >> last modified March 2010 >> System: Linux 2.6.35.11-83.fc14.i686 >> >> Anyway, the autoscale.dem demo is failing: >> >> gnuplot> load 'autoscale.dem' >> >> gnuplot> set yrange [*<-5:5<*] > > That is a new syntax from 4.5, but it seems you are running some > [perhaps modified] variant of version 4.4 Oh, thanks. I found the issue. I didn't fully install the compiled code and must have mistyped the path to the executable file. Fixing that, this demo works fine now. >> 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)". Dan |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2011-03-12 19:49:39
|
On 12.03.2011 20:09, Daniel J Sebald wrote: > On 03/12/2011 12:36 PM, Ethan Merritt wrote: >> On Saturday, March 12, 2011, Daniel J Sebald wrote: > It's part of SourceForge, isn't it? At least I think that is what the > "Download GNU tarball" feature of SourceForge is supposed to be: > > http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/ That's a tarball of the head revisions of everything. And that's actually a feature of ViewVC, not SourceForge. It definitely has nothing to do with the 4.4 branch in any way. > If I followed the discussion of a couple months ago correctly, > SourceForge is no longer supporting CVS. You didn't follow correctly. SourceForge.net sees CVS as a liability, but they haven't announced anything like a termination of service on it. They would prefer us to move to Subversion or something, but they won't force that decision on us (yet). |
|
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 |
|
From: Ethan M. <merritt@u.washington.edu> - 2011-03-14 04:36:28
|
On Sunday, March 13, 2011, Daniel J Sebald wrote: > 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. I take it you are refering to addition of the line plot_bounds.xleft = xoffset * t->xmax; It looks to me that the program flow is currently - preliminary calculation of xleft, xbot, etc - calculation of key box size - add key box size where needed - calculation of tic label sizes - recalculate xleft, xbot, etc now using the tic label sizes - oops the key box wasn't added in again It may be that the key box size has to be added in twice, once for the preliminary calculation and once for the final calculation. Or it may be that it only has to be included in the final calculation, whereas right now it is only included in the preliminary calculation. I'm not sure which fix is correct. Ethan > > 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 > |
|
From: Daniel J S. <dan...@ie...> - 2011-03-14 05:11:52
|
On 03/13/2011 11:33 PM, Ethan Merritt wrote: > On Sunday, March 13, 2011, Daniel J Sebald wrote: >> 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. > > I take it you are refering to addition of the line > > > plot_bounds.xleft = xoffset * t->xmax; > > > > It looks to me that the program flow is currently > - preliminary calculation of xleft, xbot, etc > - calculation of key box size > - add key box size where needed > - calculation of tic label sizes > - recalculate xleft, xbot, etc now using the tic label sizes > - oops the key box wasn't added in again > > It may be that the key box size has to be added in twice, > once for the preliminary calculation and once for the final > calculation. Or it may be that it only has to be included > in the final calculation, whereas right now it is only included > in the preliminary calculation. > I'm not sure which fix is correct. The way I looked at it, when the key is outside (that's the case where this is important), its presence effectively shrinks the region for the plot. I guess that is how the tic labels work as well. xleft, etc. should be adjusted relative to their current values whenever a new item is added outside its boundaries, I would think. From what I recall, there is a lot of code for setting the plot locations, and justifiably so. But it was difficult to follow and in some cases may have duplicate code. As a result it feels a bit like trial and error getting layout right. What's needed is a outline, as you've listed above. I'm not sure it is worth trying to clean this up until the day comes for multiple keys. Not poorly written; just big. Dan |