1

I have a huge scatter plot matrix to generate and save into a zoom-able image. I takes a bunch of hours to draw and then I got some errors like: "Server Error Unabe to establish connection with R session".

Any ideas? The problem is obviously memory, but there must be a way to get around this.

I've managed to save the file as a pdf format of 28.7 MB, it takes a lot of time to display and makes inkscape crash. I know that people who generate fractals are able to make images of infinite resolution without consuming a lot of memory since the image is generate as u zoom into it. Problem is fractals are self similar and scatterplots are not, so I'm not sure if there's a smart way to get around this issue.

user3083324
  • 585
  • 8
  • 23
  • 3
    How about [saving as PDF or SVG](http://www.cookbook-r.com/Graphs/Output_to_a_file/) and then zooming in another program like [Inkscape](http://www.inkscape.org/en/)? – Ben Jan 04 '14 at 05:32
  • Am I supposed to create the file before plotting? – user3083324 Jan 04 '14 at 19:58
  • Not quite sure what you mean... have you tried the method at the webpage I linked to? That will create the plot as a file, rather than display it on your screen during your R session. Note the advice that bitmap (ie. PNG, TIFF, etc.) formats make smaller files and might be faster for large datasets, but they're not as good for zooming. If you want more & better help, you'll need to supply a lot more detail about your problem (please edit your question to include a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)) – Ben Jan 04 '14 at 20:42
  • if there are eg 100000 data points then the pdf will be large and slow to display. you could choose a more informative (but less "dense") type of plot instead of representing each data point as a point in the graph. or try compressing your pdf with eg. ghostscript before viewing it. – lebatsnok Jan 04 '14 at 21:32
  • How do I install ghostcript on Ubuntu? – user3083324 Jan 04 '14 at 23:27
  • qpdfview is quite fast for reading pdf files – user3083324 Sep 03 '14 at 17:37

1 Answers1

0

A possible way to get around this "information overload" is to plot variables in pairs using qplot() and then save the file using ggsave(), for example in bmp on jpeg files.

user3083324
  • 585
  • 8
  • 23