I have an example where i plot an image and load it dynamically in an image analysis tool to create a film (dynamic graph). This works well under Windows but i can't plot to *.png or *.jpeg files under Linux (Ubuntu) with the same command. I'm using: png(file,width=200,height=200) or jpeg(file,width=200,height=200) Any help is appreciated With kind regards Marcel -- View this message in context: http://www.nabble.com/Create-*png-or-*.jpeg-plot-under-Linux-tf4632271.html#a13227574 Sent from the R help mailing list archive at Nabble.com.
On Mon, 15 Oct 2007, Bio7 wrote:> > I have an example where i plot an image and load it dynamically in an image > analysis tool to create > a film (dynamic graph). This works well under Windows but i can't plot to > *.png or *.jpeg files > under Linux (Ubuntu) with the same command.And why not? If you get an error message, consult ?png, and if that does not help, ask again with full details.> I'm using: > > png(file,width=200,height=200) or jpeg(file,width=200,height=200) > > Any help is appreciated > > With kind regards > > Marcel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Marcel wrote:> > (...) I can't plot to *.png or *.jpeg files under > Linux (Ubuntu) with (...) > > png(file,width=200,height=200) or jpeg(file,width=200,height=200) >A few reasons: (1) You run R in an account that has no priviledge to write to the directory. Check if you can write anything, for example: sink("test.txt"); cat("Hello, world!"); sink() if there is a test.txt file, then you can; else this is the problem. (2) Maybe file is some evil-coded name, with non-standard characters. It works under Windows, because Windows encourages the user to create horrible filenames (when I become the World's Evil Overlord, I will hunt the jerk that introduced whitespaces in filenames, and send him/her to the pared?n), but not under Linux. Alberto Monteiro
I used this plotting command with try(jpeg..) to catch errors with the Rserve application under Windows as the OS. I removed the try() construct under Linux and then it worked as it should (i never came to the idea to remove it..). Thank you for your answer With kind regards Marcel -- View this message in context: http://www.nabble.com/Create-*png-or-*.jpeg-plot-under-Linux-tf4632271.html#a13230894 Sent from the R help mailing list archive at Nabble.com.
Also thank you for your answer. It was the evil try() which i tried. And you are right about whitespaces in filenames! Also with kind regards Marcel -- View this message in context: http://www.nabble.com/Create-*png-or-*.jpeg-plot-under-Linux-tf4632271.html#a13230948 Sent from the R help mailing list archive at Nabble.com.