R: Not able to save the plot -
this question has answer here:
- call plot doesn't produce plot 1 answer
i generating plot able see in rmarkdown output whenever trying save it, getting blank(white) image. adding following 2 lines before , after plot
png("output.png") #plot code dev.off()
it working. , stopped working. can me on this??
edit
when pdf
pdf("output.pdf") #plot code dev.off()
i getting error as:
there error opening document. document cannot opened because has no pages.
thanks.
from comments gather right, need print resulting ggplot2
object in order show plot, see r faq 7.22.
Comments
Post a Comment