I was able to save a plot to a variable by following In R, how to plot into a memory buffer instead of a file?
I haven't been able to set the height and width of the resulting image without crashing R and my Java program. (R is called from a Java program using REngine running on Mac OSX Lion).
Before plotting, I have tried both:
windows.options(width=2, height=2)
and
Cairo(width=2, height=2,file='/dev/null')
No dice.