Re: [R] plot and save as png
Hi A.K This is working layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() but if I add this line png(filename = fname.png, width = 900, height = 600, units = 'px') no plot is generated. where is the problem?. thanks veepsirtt png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() null device 1 sessionInfo() R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.15.1 On Mon, Mar 18, 2013 at 6:36 PM, arun kirshna [via R] ml-node+s789695n4661660...@n4.nabble.com wrote: Hi, Couldn't reproduce your problem. Using your code, I am getting the image below: A.K. -- If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/plot-and-save-as-png-tp4661435p4661660.html To unsubscribe from plot and save as png, click herehttp://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4661435code=dmVlcHNpcnR0QGdtYWlsLmNvbXw0NjYxNDM1fDY5NzkzMTE3Nw== . NAMLhttp://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://r.789695.n4.nabble.com/plot-and-save-as-png-tp4661435p4662114.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] plot and save as png
Hi, So when you run the code suggested: png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() exactly like that, you do not get a file named fname.png in your working directory? Do you get an error message, or any other information from the R console? Sarah On Thu, Mar 21, 2013 at 1:55 PM, veepsirtt veepsi...@gmail.com wrote: Hi A.K This is working layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() but if I add this line png(filename = fname.png, width = 900, height = 600, units = 'px') no plot is generated. where is the problem?. thanks veepsirtt png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() null device 1 sessionInfo() R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.15.1 On Mon, Mar 18, 2013 at 6:36 PM, arun kirshna [via R] ml-node+s789695n4661660...@n4.nabble.com wrote: Hi, Couldn't reproduce your problem. Using your code, I am getting the image below: A.K. -- Sarah Goslee http://www.functionaldiversity.org __ R-help@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.
Re: [R] plot and save as png
Hi, I am not sure about the problem. I am able to generate the pdf. with the codes: png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() A.K. - Original Message - From: Sarah Goslee sarah.gos...@gmail.com To: veepsirtt veepsi...@gmail.com Cc: r-help r-help@r-project.org Sent: Thursday, March 21, 2013 3:18 PM Subject: Re: [R] plot and save as png Hi, So when you run the code suggested: png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() exactly like that, you do not get a file named fname.png in your working directory? Do you get an error message, or any other information from the R console? Sarah On Thu, Mar 21, 2013 at 1:55 PM, veepsirtt veepsi...@gmail.com wrote: Hi A.K This is working layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() but if I add this line png(filename = fname.png, width = 900, height = 600, units = 'px') no plot is generated. where is the problem?. thanks veepsirtt png(filename = fname.png, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 4, 1, byrow = TRUE)) plot(sin, -pi, 10*pi) plot(sin, -pi, 20*pi) plot(sin, -pi, 30*pi) plot(sin, -pi, 40*pi) dev.off() null device 1 sessionInfo() R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.15.1 On Mon, Mar 18, 2013 at 6:36 PM, arun kirshna [via R] ml-node+s789695n4661660...@n4.nabble.com wrote: Hi, Couldn't reproduce your problem. Using your code, I am getting the image below: A.K. -- Sarah Goslee http://www.functionaldiversity.org __ R-help@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. attachment: fname.png__ R-help@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.