[BioC] More heatmap.2 graphics

Sean Davis sdavis2 at mail.nih.gov
Fri Mar 10 15:18:57 CET 2006




On 3/10/06 8:58 AM, "Al Ivens" <alicat at sanger.ac.uk> wrote:

> Hi Sean,
> 
> Thanks for this.
> 
>> Are you using heatmap or heatmap.2?  Heatmap.2 defaults to
>> not forcing a square image.  Heatmap, though, defaults to a
>> square image.  Is this to what you are referring?
> 
> Sort of!  Most of the "problems" stem from saving the plot out to a png,
> but it seems one can get around this by specifying "height" as an
> appropriate direct multiple of the matrix rows, and letting "width" sort
> itself out.
> 
> Probably a fairly esoteric query, but is there a way of controlling the
> aspect ratio of the cells that make up the map, i.e. do they HAVE to be
> rectangles?

You could probably make a wrapper that includes a calculation of the
approximate size of the resulting image (assuming that you want
approximately square cells) given the number of genes/samples, do the
appropriate png() or pdf() command with the calculated height/width
specified, then do the heatmap[.2]() command.

Sean



More information about the Bioconductor mailing list