From: Alan W. I. <ir...@be...> - 2008-10-21 02:18:15
|
On 2008-09-29 16:27-0400 Hezekiah M. Carty wrote: > I have attached two potential patches to make such a change. They > both add a plP_gvpw function, exported through plplotP.h but not > plplot.h. The first (plP_gvpw-full.patch) replaces all internal > (src/*) calls to plgvpw with plP_gvpw. The second > (plP_gvpw-partial.patch) has the same content, except that the plgvpw > -> plP_gvpw replacement was only done in the label_box function in > plbox.c because that seems to be the only place where it is needed. > Only one of these patches should be applied if this proposal is > accepted. Hi Hez: Since Maurice approved your general ideas, I decided to go ahead with their implementation starting with your plP_gvpw-full.patch implementation since theoretically (subject to rounding differences because of possible different order of computations) that general approach should give identical results for all our examples. There are some issues with your patch which I have solved: * There is a name clash with the deprecated plP_gvpw which you solved by removing support for that old deprecated name in plplot.h. I would prefer to get rid of all our deprecated names and routines all at once at a well-publicized time in the middle or distant future so I dropped that part of your patch and renamed your new function to plP_xgvpw (x for extended). * That edited patch applied fine, built and ctested without obvious problems, but I found extensive differences when comparing old and new plot results generated by ctest that indicated some patch issue. That lead me to look deeper for all uses of the raw stream variables using find -type f |grep -v .svn |grep -v '~$' |xargs egrep -n '([>.]vpwxmi|[>.]vpwxma|[>.]vpwymi|[>.]vpwyma)' That command turned up plwind.c where indeed some raw values of the stream variables for windows limits were being used rather than the extended values. Once that was fixed up, old and new ctest generated identical plot example results for *.psc, *.psttfc, *.png, and *.svg. All examples were different with *.pngcairo. However, if I ignored the first 70 bytes in the comparison using "cmp -i 70" all was fine. Looking at one of those examples with od -a showed a t I M E identifier so my conclusion is that libcairo is putting in timestamp values into the output pngcairo results which messes up any comparisons unless you ignore the bytes where the timestamp occurs. Thus, these differences have nothing to do with the current changes to PLplot, but it is something to remember when comparing different sets of *.pngcairo results in the future. Example 7, 12, 23, 24, and 29 differed for *.pscairo. All examples only had difference in the font section. Since that is big and also essentially binary, all I can say from the file evidence is it is possible that small rounding differences have propagated to the fonts. I followed up by visually comparing gv viewer results for example 24 in the two cases, and I could spot no visual differences at all. Anyhow, my conclusion is these few unexplained differences are unrelated to the source code change or too small to worry about in the results that you see so I have gone ahead and committed these changes (revision 8943). Thanks, Hez, for coming up with a reasonable idea for dealing with this nasty user inconsistency issue without expanding our API and also thanks for implementing most of it. (And don't worry about the small additional changes that were required for plwind since I missed those myself the first time I looked in detail at your patch.) Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |