[Rd] Re: [R] problem clipping R postscript plots within latex (PR#625)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
03 Aug 2000 17:32:39 +0200


ripley@stats.ox.ac.uk writes:

> > >     /cl  { gr gs newpath 3 index 3 index moveto 1 index
> > > 	   4 -1 roll lineto  exch 1 index lineto lineto
> > > 	   closepath clip newpath } def
> > > 
> > >     PD> and end everything with a "gr". Not too sure that is perfectly
> > >     PD> safe, though...


>     The postscript produced by R is EPS (Encapsulated PostScript)
>     compatible,
> 
> yet initclip is not allowed in EPS files (PostScript Language Reference
> Manual, 2nd edition).  

Exactly. 

> I think the statement was possibly true once ....

I don't think so. This is a design problem.

Unfortunately, the simple fix above doesn't seem to work [for rather
foreseeable reasons]. mosaicplot() seems to crash ghostview and even
plot(1:10) comes out without axis titles. 

The latter item occurs because we're doing

clip(region1)
set font
draw text
clip(region2)
draw more text in same font

but restoring the graphics context prior to the first clipping 
requires the font to be set once again. And there are probably many
similar problems. Sigh. 

Paul, are you around?

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