Plotting multiple graphs with a heatmap
1
0
Entering edit mode
@fong-chun-chan-4166
Last seen 9.6 years ago
Hi Has anyone been successful in plotting multiple plots on the same graph with a heatmap? I've been using the par() function to set the mfrow, or mfcol parameters and it works when I try to plot boxplots or any other plot. But I can't seem to get a heatmap to appear on the same graph. If I plot a heatmap, it will either just take up the entire plot or it won't appear at all. I haven't been able to find any other messages regarding this. Any help would be greatly appreciated. Thanks, Fong [[alternative HTML version deleted]]
graph graph • 2.6k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 14 months ago
United States
Hi, On Tue, Mar 1, 2011 at 6:14 PM, Fong Chun Chan <fongchun at="" interchange.ubc.ca=""> wrote: > Hi > > Has anyone been successful in plotting multiple plots on the same graph with > a heatmap? ?I've been using the par() function to set the mfrow, or mfcol > parameters and it works when I try to plot boxplots or any other plot. ?But > I can't seem to get a heatmap to appear on the same graph. ?If I plot a > heatmap, it will either just take up the entire plot or it won't appear at > all. ?I haven't been able to find any other messages regarding this. ?Any > help would be greatly appreciated. To save you some time: I'm pretty sure that you can't actually do that with the heatmap (or heatmap.2) function. It will hog the entire graphics device for itself. Maybe you can use some other tool (like Illustrator, for example) to stitch heatmaps together after you save them? There are other ways to plot heatmaps, like using "levelplot" from lattice, as well geom_tile with ggplot -- I wonder if you can rig those plotting tools up to get the graph you want? (Not sure). -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT
0
Entering edit mode
It cannot be done, since heatmap requires the "layout" function to get all the pieces into place. Documentaion for layout points out that it does not play well with mfrow or mfcol or other ways to subdivide the plot area. On 3/1/2011 8:59 PM, Steve Lianoglou wrote: > Hi, > > On Tue, Mar 1, 2011 at 6:14 PM, Fong Chun Chan > <fongchun at="" interchange.ubc.ca=""> wrote: >> Hi >> >> Has anyone been successful in plotting multiple plots on the same graph with >> a heatmap? I've been using the par() function to set the mfrow, or mfcol >> parameters and it works when I try to plot boxplots or any other plot. But >> I can't seem to get a heatmap to appear on the same graph. If I plot a >> heatmap, it will either just take up the entire plot or it won't appear at >> all. I haven't been able to find any other messages regarding this. Any >> help would be greatly appreciated. > To save you some time: I'm pretty sure that you can't actually do that > with the heatmap (or heatmap.2) function. It will hog the entire > graphics device for itself. > > Maybe you can use some other tool (like Illustrator, for example) to > stitch heatmaps together after you save them? > > There are other ways to plot heatmaps, like using "levelplot" from > lattice, as well geom_tile with ggplot -- I wonder if you can rig > those plotting tools up to get the graph you want? (Not sure). > > -steve >
ADD REPLY

Login before adding your answer.

Traffic: 670 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6