Tamas K Papp
2007-Jan-31 14:50 UTC
[Rd] possible bug: dev.copy / could not find any X11 fonts
Hi, I am experiencing something strange, and thought I would ask before reporting a bug. I trimmed it down to a self-contained example, attached as an R file. The purpose of the functions is to save the plots into a ps file and simultaneously plot them on an x11 device, but don't open a new one if there is already one opened (I don't want the repositioning / flicker). When running the code:> source("plotf.r") > plotf(avc,1)Error in dev.copy(which = x11dev) : could not find any X11 fonts Check that the Font Path is correct. The error message reappears whenever I switch to the plot window. A partial plot is in the x11 window. When called in other contexts, plotting functions work perfectly, so I don't see what the problem is. Thanks, Tamas version information: _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 4.1 year 2006 month 12 day 18 svn rev 40228 language R version.string R version 2.4.1 (2006-12-18) -------------- next part -------------- a <- 1:5 avc <- list(v=a,cons=a,saving=a) findx11dev <- function(create=TRUE) { devices <- dev.list() x11dev <- which(names(devices)=="X11") if (length(x11dev)==0) { if (create) { x11() dev.cur() } else { NULL } } else { devices[tail(x11dev,1)] } } plotf <- function(avc,k,...) { plotm <- function(m, ...) plot(1:5,m,type="l",...) ## open ps device postscript(sprintf("plot-%03d.eps",k)) psdev <- dev.cur() dev.control("enable") ## plot layout(1:3) plotm(avc$v, main="value", ylab="v") plotm(avc$cons, main="consumption", ylab="c") plotm(avc$saving, main="saving", ylab="s") ## copy & close ps device x11dev <- findx11dev() dev.set(psdev) dev.copy(which=x11dev) dev.off(psdev) }
Peter Dalgaard
2007-Jan-31 17:14 UTC
[Rd] possible bug: dev.copy / could not find any X11 fonts
Tamas K Papp wrote:> Hi, > > I am experiencing something strange, and thought I would ask before > reporting a bug. I trimmed it down to a self-contained example, > attached as an R file. The purpose of the functions is to save the > plots into a ps file and simultaneously plot them on an x11 device, > but don't open a new one if there is already one opened (I don't want > the repositioning / flicker). > > When running the code: > > >> source("plotf.r") >> plotf(avc,1) >> > Error in dev.copy(which = x11dev) : could not find any X11 fonts > Check that the Font Path is correct. > > The error message reappears whenever I switch to the plot window. A > partial plot is in the x11 window. > > When called in other contexts, plotting functions work perfectly, so I > don't see what the problem is. > >Annoying, but your example works for me, so I suspect that the problem is nevertheless a setup issue at your end.... I would guess that the culprit is the tiny font used to label the axes. Things like this sometimes happen when you are missing 75dpi fontset. If you fire up xfontsel, can you find -adobe-helvetica-medium-r-*-*-8-*-*-*-*-*-iso8859-1 ? (available pixel sizes should be 8,10,11,12,14,17,18,20,24,25,34)> Thanks, > > Tamas > > > version information: > _ > platform i486-pc-linux-gnu > arch i486 > os linux-gnu > system i486, linux-gnu > status > major 2 > minor 4.1 > year 2006 > month 12 > day 18 > svn rev 40228 > language R > version.string R version 2.4.1 (2006-12-18) > > ------------------------------------------------------------------------ > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Hin-Tak Leung
2007-Feb-01 02:08 UTC
[Rd] possible bug: dev.copy / could not find any X11 fonts
Peter Dalgaard wrote: <snipped>> Annoying, but your example works for me, so I suspect that the problem > is nevertheless a setup issue at your end.... I would guess that the > culprit is the tiny font used to label the axes. Things like this > sometimes happen when you are missing 75dpi fontset. If you fire up > xfontsel, can you find > > -adobe-helvetica-medium-r-*-*-8-*-*-*-*-*-iso8859-1 > > ? > (available pixel sizes should be 8,10,11,12,14,17,18,20,24,25,34)The examples also works for me, and I was wondering about similiar issues; but my thought is more along the line of the scalable PS Type 1 fonts being missing. (The Type 1 fonts is scalable and functions as catch-all for any size). Given the vintage of it - i486-* probably indicates that the CPU is pre-pentium or the linux distribution is, so the X server may not be able to or configured to use PS Type1 fonts. On my X server I have both the -adobe-helvetica-* bitmap fonts, and also it as PS Type 1 (The URW clone of the 13 standard postscript fonts is carried by ghostcript and also occasionally carried by or made available on some linux distro to Xfree/Xorg) HTL>> version information: >> _ >> platform i486-pc-linux-gnu >> arch i486 >> os linux-gnu >> system i486, linux-gnu >> status >> major 2 >> minor 4.1 >> year 2006 >> month 12 >> day 18 >> svn rev 40228 >> language R >> version.string R version 2.4.1 (2006-12-18) >> >> ------------------------------------------------------------------------ >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
R. Villegas
2007-Feb-08 10:24 UTC
[Rd] possible bug: dev.copy / could not find any X11 fonts
2007/1/31, Tamas K Papp <tpapp at princeton.edu>:> Hi, > > I am experiencing something strange, and thought I would ask before > reporting a bug. I trimmed it down to a self-contained example, > attached as an R file. The purpose of the functions is to save the > plots into a ps file and simultaneously plot them on an x11 device, > but don't open a new one if there is already one opened (I don't want > the repositioning / flicker). > > When running the code: > > > source("plotf.r") > > plotf(avc,1) > Error in dev.copy(which = x11dev) : could not find any X11 fonts > Check that the Font Path is correct. > > The error message reappears whenever I switch to the plot window. A > partial plot is in the x11 window. > > When called in other contexts, plotting functions work perfectly, so I > don't see what the problem is. > > Thanks, > > Tamas > > > version information: > _ > platform i486-pc-linux-gnu > arch i486 > os linux-gnu > system i486, linux-gnu > status > major 2 > minor 4.1 > year 2006 > month 12 > day 18 > svn rev 40228 > language R > version.string R version 2.4.1 (2006-12-18) > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > >I see this error last time in Ubuntu Edgy. Check your FontPath in /etc/X11/xorg.conf.
Maybe Matching Threads
- breaking an axis (skipping part of it)
- [PATCH] xen-pciback: fix error return code in pcistub_irq_handler_switch()
- [PATCH] xen-pciback: fix error return code in pcistub_irq_handler_switch()
- Another failed attempt to install an R package in Ubuntu
- fdim questions