[R] Not saving plot

Rich Shepard rshepard at appl-ecosys.com
Wed Sep 28 15:55:22 CEST 2011


On Wed, 28 Sep 2011, Joel wrote:

> Seems to have something todo with barchart. Cuz if I just change it to
> plot it works.
>
> But I want to use barchart due to the graphical advantages so do anyone
> have an ide.

Joel,

   Perhaps. Do you want to save your figure to disk as a .pdf, .jpg, or .png?

   If so, you need to tell R that's what you want. For example,

jpg("mybarchart.jpg")
<now enter your barchart creation command>
dev.off()

   This sequence directs the output of the figure from the screen to the
named file. Afterwards you need to return the display to the screen or any
other plotting command will be saved in that one file, overwriting whatever
it contains.

Rich



More information about the R-help mailing list