Exception created in RGUI.exe (PR#1748)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Fri, 5 Jul 2002 22:41:08 +0100 (BST)


point 1 is user error: there are only fonts 1 to 5 documented anywhere
for this device.  pdf() in R-devel has been Holtman-proofed.

point 2 is also user error: the text falls on the boundary of the plot
region.  The PS device can clip partial text, whereas the PDF device
cannot.  Use xpd=TRUE if you want to plot on the edge of the region.

See the comment below.

On Fri, 5 Jul 2002 james.holtman@convergys.com wrote:

> I was trying to print out some text on an  empty PDF graph so that I would
> have the statistical data in the same file as the graphs.  I was having
> problems in getting the output in a PDF file, but could get it in a
> postscript and BMP file.  I put together the script below to see what
> 'fonts' were available on PDF, is it caused an exception.
>
>
>  I was getting an exception in the pdf call originally.  The
> > follow script causes an exception in the RGUI.exe module at 0x00460AF8
> > referencing memory at 0xFFC7BE79.
> >
> > pdf()
> > plot(1,1,ylim=c(0,20))
> > for (i in 1:10){    # print out what each font is
> >     cat(i,'\n')
> >     text(1,i,paste('font =',i), font=i)
> > }
> > dev.off()
> >
> > Jim Holtman
>
> platform i386-pc-mingw32
> arch     i386
> os       mingw32
> system   i386, mingw32
> status
> major    1
> minor    5.1
> year     2002
> month    06
> day      17
> language R
>
>
> #=================================
>
> Here is the script that puts the text in a postscript file, but not the PDF
> file.
>
>
>  pdf('test.pdf', width=6, height=6, horizontal=FALSE)
>  plot(1, 1)
>  text(par('usr')[1], par('usr')[4], "anything", adj = c(0, 1))
>  dev.off()
>
>  postscript('test.ps', width=6, height=6, horizontal=FALSE)
>  plot(1, 1)
>  text(par('usr')[1], par('usr')[4], "anything", adj = c(0, 1))
>  dev.off()

Shouting message deleted: it should not be used for messages to bug
repositoried.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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