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
Henrique Dallazuanna
2008-Aug-26 11:12 UTC
[R] savePlot() does not save plot with format set
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
Strictly, you need to type the extension _if your filename or path include a period (".")_ but not otherwise. The filename "test" alone will be saved as paste("test",type). So will, for example, "/plots/test". But filenames such as "test.it" or "../plots/test" will not include the extension automatically. Steve Ellison>>> "Henrique Dallazuanna" <wwwhsd at gmail.com> 26/08/2008 12:12 >>>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.******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
Did you try: savePlot("test.bmp", type = "bmp") Monica ------------------------------------------------------------------------ Message: 118 Date: Tue, 26 Aug 2008 10:29:13 +0100 From: "Luis Ridao Cruz" Subject: [R] savePlot() does not save plot with format set To: Message-ID: Content-Type: text/plain; charset="US-ASCII" 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 Editor plot(rnorm(10)) savePlot("test", type="png") savePlot("test", type="bmp")> 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