sc@paracelsus.fdm.uni-freiburg.de
2001-Jul-23 10:57 UTC
[Rd] hang-up with log="x" and segments (PR#1030)
I experienced the following problem with R 1.3.0 which is probably a bug. The program hangs-up if 1.) a coordinate of segments is outside the ploting region and 2.) the option log="x" is used. ## ## works fine ## plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2)) segments(0.5 , 1.2, 1, 0.6) segments(0.25, 1.2, 1, 0.6) segments(1 , 1.2, 1, 0.6) ## ## hang-up ## plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2), log="x") segments(0.5 , 1.2, 1, 0.6) segments(0.25, 1.2, 1, 0.6) segments(1 , 1.2, 1, 0.6) platform sparc-sun-solaris2.8 arch sparc os solaris2.8 system sparc, solaris2.8 status major 1 minor 3.0 year 2001 month 06 day 22 language R Obviously, a work-around is to ensure that segments falls within the ploting region. Best regards, -- Guido Schwarzer sc@imbi.uni-freiburg.de | Phone: +49 (0)761 203 7702 German Cochrane Centre http://www.cochrane.de | Fax: +49 (0)761 203 7700 Institute of Medical Biometry and Medical Informatics Stefan-Meier-Str. 26, D-79104 Freiburg http://www.imbi.uni-freiburg.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
sc@paracelsus.fdm.uni-freiburg.de writes:> I experienced the following problem with R 1.3.0 which is probably a > bug. The program hangs-up if 1.) a coordinate of segments is outside the > ploting region and 2.) the option log="x" is used. > > ## > ## works fine > ## > plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2)) > segments(0.5 , 1.2, 1, 0.6) > segments(0.25, 1.2, 1, 0.6) > segments(1 , 1.2, 1, 0.6) > > ## > ## hang-up > ## > plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2), log="x") > segments(0.5 , 1.2, 1, 0.6) > segments(0.25, 1.2, 1, 0.6) > segments(1 , 1.2, 1, 0.6)Confirmed on Linux, but seems to have disappeared in the patched version. Not sure what caused the fix, though... My guess would be that it is this change in CSclipline: @@ -2464,6 +2466,7 @@ yb = cr->yb; yt = cr->yt; if (dd->gp.xlog || dd->gp.ylog) { + double temp; GConvert(x1, y1, coords, NDC, dd); GConvert(x2, y2, coords, NDC, dd); @@ -2475,6 +2478,17 @@ cr2.yb = yb; cr2.yt = yt; + if (cr2.xr < cr2.xl) { + temp = cr2.xl; + cr2.xl = cr2.xr; + cr2.xr = temp; + } + if (cr2.yt < cr2.yb) { + temp = cr2.yb; + cr2.yb = cr2.yt; + cr2.yt = temp; + } + x = xl; /* keep -Wall happy */ y = yb; /* keep -Wall happy */ while( c1 || c2 ) { -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi> > I experienced the following problem with R 1.3.0 which is probably a > > bug. The program hangs-up if 1.) a coordinate of segments is outside the > > ploting region and 2.) the option log="x" is used. > > > > ## > > ## works fine > > ## > > plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2)) > > segments(0.5 , 1.2, 1, 0.6) > > segments(0.25, 1.2, 1, 0.6) > > segments(1 , 1.2, 1, 0.6) > > > > ## > > ## hang-up > > ## > > plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2), log="x") > > segments(0.5 , 1.2, 1, 0.6) > > segments(0.25, 1.2, 1, 0.6) > > segments(1 , 1.2, 1, 0.6) > > Confirmed on Linux, but seems to have disappeared in the patched > version. Not sure what caused the fix, though... My guess would be > that it is this change in CSclipline:Yep, that went in during the fix-so-far to bug#997. Paul -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._