[Rd] followup to graphics bug #414

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
21 Mar 2000 01:28:56 +0100


"Paul Murrell" <paul@stat.auckland.ac.nz> writes:

> > I suspect it will. The clipping functions are broken with logged axes
> > on all devices which cannot do their own clipping, and since Paul made
> > devPS capable of clipping...
> 
> 
> or it may have just made it a little more sinister.  devices which can do
> their own clipping still use the R clipping to preclip to the device extent.
> so if you specify a line which extends outside of the device extent (and you
> have log axes) it will be (incorrectly) clipped by R before sending on to
> the device.

Hmmno.. (well maybe now in the development version.) In R-release, we have

    if (dd->dp.canClip) {
        GClip(dd);
        dd->dp.polyline(n, x, y, coords, dd);
    }
    else
        CScliplines(n, x, y, coords, dd);

and CScliplines has the problem. GClip just sets the clip boundary for
the device.

> also, Ross has pointed out that R's polygon clipping probably suffers from
> the same problem (has anyone tried drawing polygons with log axes ?).  He
> may take a look at this soon because he's mucking about with polygon
> clipping for his maps stuff.

Yes. Same problem. Silly thing is that the only (simple) way to fix it
seems to be to take logs, do the clipping, take antilogs, and then
have the device function take logs once again...

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._