Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Error : Unable to start png() device

$
0
0

I am using Windows. When trying to plot a graph on png device, it fails with the error.

My code:

png("C:\\plot1.png", width = 480, height = 480, units = "px", bg = "white")par(mar= c(4, 4, 2, 1))hist(pwrcon$Global_active_power,col = "red", main = "Global Active Power", xlab = "Global Active Power (kilowatts)")dev.off()

Error:

Error in png("C:\\plot1.png", width = 480, height = 480, units = "px",  :   unable to start png() deviceIn addition: Warning messages:1: In png("C:\\plot1.png", width = 480, height = 480, units = "px",  :  unable to open file 'C:\plot1.png' for writing2: In png("C:\\plot1.png", width = 480, height = 480, units = "px",  :  opening device failed

Can anyone help me in getting this resolved?

Thanks in advance


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>