Re: [R] sizing and saving graphics in R

From: Murray Pung <mcpung_at_gmail.com>
Date: Thu, 31 May 2007 10:22:09 +1000

I use the savePlot function for saving graphics. The following will save the active graphics panel in your working directory, in format wmf, which I find has a high resolution. Check out other possible formats in help.

savePlot(filename = "myfilename",type = c("wmf"))

Murray

On 31/05/07, Felicity Jones <felicity.jones_at_stanford.edu> wrote:
>
>
> 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
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.
>

-- 
Murray Pung
Statistician, Datapharm Australia Pty Ltd
0404 273 283

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_stat.math.ethz.ch 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.
Received on Thu 31 May 2007 - 00:30:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 May 2007 - 20:33:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.