Re: [Plplot-devel] Problem with tick marks and tight ranges
On 2010-03-03 20:42- Andrew Ross wrote: > > David, > > I agree this is a potential problem, particularly if you are using > float rather than double precision. It should be fixed to stop > plplot getting stuck in an infinite loop, but to be honest > if you are really trying to plot such a small range then rounding > errors are likely to occur with all the rest of the plotting code > too. I'll add it to my list unless anyone else can provide a patch > first. I also agree its a potential problem. Andrew or David if you are implementing a fix, I would like you to set some ridiculous maximum value on the number of tick marks (say 10, we don't want to be anal-retentive here because there are probably some PLplot applications for long spectra that do have a rather large number of tick marks) and when that ridiculous limit is exceeded, give a warning (saying specifically more than 10 tick marks were generated) and move on. 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 __ -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] Problem with tick marks and tight ranges
On Mar 3, 2010, at 12:42 , Andrew Ross wrote: > It should be fixed to stop > plplot getting stuck in an infinite loop, but to be honest > if you are really trying to plot such a small range then rounding > errors are likely to occur with all the rest of the plotting code > too. Getting plots with rounding errors is certainly better than getting a runaway process and no plots! :-) > I'll add it to my list unless anyone else can provide a patch > first. Great, thanks! Dave -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] Problem with tick marks and tight ranges
David, I agree this is a potential problem, particularly if you are using float rather than double precision. It should be fixed to stop plplot getting stuck in an infinite loop, but to be honest if you are really trying to plot such a small range then rounding errors are likely to occur with all the rest of the plotting code too. I'll add it to my list unless anyone else can provide a patch first. Andrew On Tue, Mar 02, 2010 at 01:22:49PM -0800, David MacMahon wrote: > I think I've found a problem with tick marks and tight ranges. > > The tick marks seem to be drawn by starting at an initial "tick > position" and then repeatedly incrementing the tick position by a > delta value until the tick position advances out of range. If the > window is setup for a tight y (or x) range, the magnitude of the non- > zero delta value can be so small that tp+delta == tp (due to limited > bits in the floating point mantissa) and so the incremental process > never finishes and plenv (or plbox or, really, plaxes) never returns > and CPU usage goes to 100%. > > It would be safer to calculate the number ticks to be drawn and then > use an explicitly bounded for loop to draw exactly that many ticks at > positions (initial_pos + i*delta). > > This problem should be repeatable by using one of these... > > plenv(0, 1, 1-1e-16, 1+1e-16, 0, 0); > > plenv(0, 1, 1e16, 1e16+10, 0, 0); > > Dave > > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel > -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
[Plplot-devel] Problem with tick marks and tight ranges
I think I've found a problem with tick marks and tight ranges. The tick marks seem to be drawn by starting at an initial "tick position" and then repeatedly incrementing the tick position by a delta value until the tick position advances out of range. If the window is setup for a tight y (or x) range, the magnitude of the non- zero delta value can be so small that tp+delta == tp (due to limited bits in the floating point mantissa) and so the incremental process never finishes and plenv (or plbox or, really, plaxes) never returns and CPU usage goes to 100%. It would be safer to calculate the number ticks to be drawn and then use an explicitly bounded for loop to draw exactly that many ticks at positions (initial_pos + i*delta). This problem should be repeatable by using one of these... plenv(0, 1, 1-1e-16, 1+1e-16, 0, 0); plenv(0, 1, 1e16, 1e16+10, 0, 0); Dave -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel