|
From: Manfred S. <man...@gm...> - 2013-05-09 22:44:18
|
Am 09.05.2013 01:00, schrieb Ethan Merritt: > On Wednesday, May 08, 2013 03:04:59 pm Manfred Schwarb wrote: >> Hi Ethan, >> >> >> Which part of the example below is not clear? One surface plot (2D map) >> with contours, a second 2D map without surface but only contours, >> and corresponding contour labels. > > It is not clear because it involves complicated scripts that don't work, > and does not include the associated data files. > So how am I to know what the intended result looks like? > For what it's worth, your script doesn't work for me when I try > it with gnuplot version 4.4.4 either, although the error message is > different: > > $ gnuplot_4.4.4 schwarb.gp > ** warning: can't use pm3d for 2d plots -- please unset pm3d > > I can make it run by moving the second "set pm3d ..." command > 5 lines down, to after the "load '$TMPGP'", but I don't know if > that's really what you intended. Perhaps you have a different > version of the label_contours.awk script than I do. > Sorry, I did not remember any more that I had modified label_contours.awk by removing the END block, so only the labels are written. > > Is it possible that the very first line of the script you posted > has crept in by error? If I comment out that line: > #set pm3d interpolate 2,2 implicit map > unset surface > ... rest of script > > then the script behaves the same for me in both gnuplot 4.4 and 4.6. > Maybe that's all you need to get past this problem. > Well, I'm quite sure I simply copied some script I found on the net, and did not think too much about it. So classical cargo-culting. Perhaps the intention was to influence the contouring by setting the interpolate option, but this is not the case. Actually the "map" in the "set pm3d ..." makes the difference, when removing it, the plot works perfectly. But then, the remaining "set pm3d interpolate 40,40 implicit" seems without effect and can be removed, so yes, your suggestion is correct. As you told, the contouring is not influenced by pm3d settings, the trouble are the side effects of the "map" option, probably by setting "set style data pm3d" >> The really strange thing is, this worked perfectly, but then >> someone put in some "error: not implemented" statement. >> How could this be not implemented, if it worked perfectly before? > > It was not implemented in version 4.4 either. The difference is > that version 4.4 failed to warn you that it couldn't handle > pm3d mode and silently ignored the "pm3d" keyword. Version 4.6 > does warn you. Both 4.4 and 4.6 will dump the coordinates > identically if you simply say > set table FOO > splot '$INFILE1' > > The change is that if you say instead > splot '$INFILE' with pm3d > it was handled in version 4.4 by silently ignoring the "with pm3d". > In version 4.6 you get an error message warning you that the > data generated by pm3d (interpolation/colors) cannot be saved > as tabular output. OK, thanks for the explanation. The strange thing is however that set table FOO; splot '$INFILE' with pm3d gives a warning, but set pm3d implicit; set table FOO; splot '$INFILE' does not... Problem solved, thanks a lot! Manfred |