1

I store the results returned by heatmap.2 (in gplots library) like this: hm <- heatmap.2(M)

Is it possible to replot the heatmap at a later time like: plot(hm), heatmap(hm)?

lucacerone
  • 9,859
  • 13
  • 52
  • 80
  • What happens when you try: `plot(hm)` or `heatmap(hm)`? – zx8754 Feb 28 '14 at 10:34
  • plot(hm) produces: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y' – lucacerone Feb 28 '14 at 11:08
  • heatmap(hm) Error in heatmap(hm) : 'x' must be a numeric matrix – lucacerone Feb 28 '14 at 11:08
  • heatmap,2(hm) Error in heatmap.2(hm) : `x' must be a numeric matrix.. Can't understand why somebody gave a negative vote to the question.. bah.. – lucacerone Feb 28 '14 at 11:09
  • `hm <- heatmap.2(M)` doesn't work for me... Try using `ggplot` - see answer by @Andrie [Reproducing lattice dendrogram graph with ggplot2](http://stackoverflow.com/questions/6673162/reproducing-lattice-dendrogram-graph-with-ggplot2) – zx8754 Feb 28 '14 at 11:31
  • 2
    I don't think you can replot directly a saved `heatmap.2` but you can do it bit by bit: look at `str(hm)` to get an idea of where are the different informations you need (`plot(hm$rowDendrogram)` will plot the tree for instance and `image(hm$carpet)` will plot the heatmap itself). – plannapus Feb 28 '14 at 12:12

0 Answers0