sean mcgee
2012-May-22 19:30 UTC
[R] trouble with png image creation in R v2.14.0 on Red Hat 6
Hello, Is anyone having trouble with png image generation with 2.14.0 on Red Hat 6? We recently updated our pipeline to Red Hat 6 (from 5) and R 2.14.0 (up from 2.9.0) and R shell scripts that worked fine before are now breaking in an unusual way. The source of the problem seems to be centered around either label names or the drawing of axii lines. Whenever I try to label or draw an axis the png image stops being created. The rest of the shell script runs through without error (even creating and filling some output files), but no more images are drawn. I've simplified the instance to a bit of code below. For example, this shell script works: *#!/bin/csh -f* *R --no-save <<Eoi* *ow <- options("warn")* *rootDir <- "$1"* *filePrefix <- "$2"* * * *filename <- paste(rootDir,"/",filePrefix,".examplePlot.png", sep="")* *png(file=filename, width = 1600, height = 1070, units = "px",type=c("cairo" ))* * * *errors <- matrix(nrow = 5, ncol = 2)* *for (i in 1:5) {* * errors[i,1] <- i* * errors[i,2] <- i*i* *}* * * *par(mfrow = c(2,1))* *plot(errors[,2]~errors[,1], axes = F)* *plot(errors[,2]~errors[,1], axes = F)* * * *warnings()* *options(ow) # reset* *Eoi* But the following does not: *#!/bin/csh -f* *R --no-save <<Eoi* *ow <- options("warn")* *rootDir <- "$1"* *filePrefix <- "$2"* * * *filename <- paste(rootDir,"/",filePrefix,".examplePlot.png", sep="")* *png(file=filename, width = 1600, height = 1070, units = "px",type=c("cairo" ))* * * *errors <- matrix(nrow = 5, ncol = 2)* *for (i in 1:5) {* * errors[i,1] <- i* * errors[i,2] <- i*i* *}* * * *par(mfrow = c(2,1))* *plot(errors[,2]~errors[,1], xlab = "", ylab = "", axes = F)* *plot(errors[,2]~errors[,1], xlab = "", ylab = "", axes = F)* * * *warnings()* *options(ow) # reset* *Eoi* *#end R code* * * Again, no errors or warnings appear to be thrown, it just seems to stop writing to the png image. The same problem happens with jpeg() and tiff(), but not with pdf(). [NOTE: I can not simply change to using pdf()] Thank you for any assistance. Sean [[alternative HTML version deleted]]
Reasonably Related Threads
- Rsync: Directories become Symbolic Links
- [PATCH v1 1/1] extlinux: fix file descriptors leak
- [PATCH v1 1/1] extlinux: fix file descriptors leak
- Height not set properly in grDevices::jpeg() with type = "cairo"
- [RESEND][PATCH] ldlinux: CurrentDir not set if syslinux.cfg is missing