From p.dalgaard@biostat.ku.dk  Thu Aug  3 16:32:39 2000
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 03 Aug 2000 17:32:39 +0200
Subject: [Rd] Re: [R] problem clipping R postscript plots within latex (PR#625)
In-Reply-To: ripley@stats.ox.ac.uk's message of "Wed, 2 Aug 2000 22:39:38 +0200 (MET DST)"
References: <200008022039.WAA03146@pubhealth.ku.dk>
Message-ID: <x2hf92bbs8.fsf@blueberry.kubism.ku.dk>

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


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