[R] sizing and saving graphics in R

Felicity Jones felicity.jones at stanford.edu
Thu May 31 00:58:02 CEST 2007


Dear R wizards,

I am seeking advice on graphics in R.  Specifically, how to manipulate  
the size and save a plot I have produced using the LDheatmap library.   
I confess I am relatively new to graphics in R, but I would greatly  
appreciate any suggestions you may have.

LDheatmap produces a coloured triangular matrix of pairwise  
associations between 600 genetic markers in my dataset.  Initially the  
graphical output was confined to the computer screen, such that each  
pairwise marker association was displayed as approximately 1 pixel  
(too small for me to interpret).

I have successfully managed to play with the LDheatmap function to  
enlarge the size of viewport by changing the following code in   
LDheatmap

#From

heatmapVP <- viewport(width = unit(0.8, "snpc"), height = unit(0.8, "snpc"),
                        name=vp.name)

#To
heatmapVP <- viewport(width = unit(25, "inches"), height = unit(25,  
"inches"), name=vp.name)

This produces a much larger plot (so big that the majority is not seen  
on the screen).  I would like to save the entire thing so that I can  
import it into photoshop or some other image software.

My problem is that when I save using the R graphics console  
(File->Save As->bmp), it only saves the section I can see on the  
screen.  Any suggestions on how to save the whole plot or manipulate  
the plot so I get higher resolution would be much appreciated.

Thanks for your help in advance,

Felicity.








_______________________________________

Dr Felicity Jones
Department of Developmental Biology
Stanford University School of Medicine
Beckman Center
279 Campus Drive
Stanford CA 94305-5329
USA



More information about the R-help mailing list