Try this, plot(1:10) img <- grid::grid.cap() # grid.raster(img) stream <- col2rgb(img) write.table(stream, file="dam.txt", row.names = FALSE, col.names = FALSE)
(you'll have to restore the dimensions of the matrix once you've read the rgb values for each pixel) HTH, baptiste On 30 January 2012 08:27, Ajay Askoolum <aa2e...@yahoo.co.uk> wrote: > I can write a plot to a files of a given format using this: > > x<-sample(c(1:100),10) > bmp("c:/mygraph.bmp") > plot(x) > dev.off() > > and then show the image file in another application. This application can > also display the image from the stream of numbers that define the image. > > How I can get the plot as a stream of numbers? > > [[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. ______________________________________________ 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.