[R] savePlot() does not save plot with format set

Henrique Dallazuanna wwwhsd at gmail.com
Tue Aug 26 13:12:34 CEST 2008


You need type the extension of the file:

plot(rnorm(10))
savePlot("test.png", type="png")
savePlot("test.bmp", type="bmp")


On Tue, Aug 26, 2008 at 6:29 AM, Luis Ridao Cruz <Luisr at frs.fo> wrote:
> R-help,
>
> Whenever I try to save a plot with "savePlot"
> the file is not stored in my hard disk with the selected
> format. Several formats are set and none of them
> works. I just get the file name with missing extension
> and it can't be open with programs like Paint and Microsoft Photo
> Editor
> Th only one able to open it is "Windows Picture and Fax Viewer"
>
>
> plot(rnorm(10))
> savePlot("test", type="png")
> savePlot("test", type="bmp")
>
>
> My platform is Windows XP SP3
>
>> version
>               _
> platform       i386-pc-mingw32
> arch           i386
> os             mingw32
> system         i386, mingw32
> status
> major          2
> minor          7.0
> year           2008
> month          04
> day            22
> svn rev        45424
> language       R
> version.string R version 2.7.0 (2008-04-22)
>
> Thanks in advanced
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list