Getting "unable to start device PNG"


Below is my code,

pngFileName = paste(pngFileName, weekBeginning, sep = "_")
pngFileName = paste(pngFileName, "png", sep = ".")
png(filename = pngFileName, width = 6000, height = 5250, res = 200)

writeFile=paste(writeFile,"csv", sep = ".")

vplayout <- function(x, y) viewport(layout.pos.row = x, layout.pos.col = y)
pushViewport(viewport(layout = grid.layout(7, 6)))
write.table(dataFinal3, file=writeFile, row.names=FALSE, sep=',')

and I am getting the below error:

rpy2.rinterface.RRuntimeError: Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, :

  • unable to start device PNG*

See if you can do this with a stated filename for a single plot, to eliminate the possibility of malformed file names. If that doesn't work, a cairo library may be needed for the system. Details depend on the OS.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.