Message-ID: <OFE0FCC87B.FB0DFB11-ON80257539.00408222-80257539.004231F1@hsl.gov.uk>
Date: 2009-01-09T12:03:08Z
From: Richard Cotton
Subject: Saving plots as byte streams
Is it possible to save plots as byte streams? For example, if I want the
bytes for a PNG plot, I could use
#Write the plot to a PNG file
png("test.png")
plot(1:10)
dev.off()
#Read the bytes back in from the file
plotbytes <- readBin("test.png", "raw", n=2000)
Ideally, I'd like to avoid having to bother writing to the file in the
first place, and simply store the bytes in a variable. How do I do this?
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}