Dear All, I want to plot a heat map with annotated columns. Both functions heatmap (stats) and heatmap.2 (gplots) can plot a horizontal side bar that can be used to visualize a categorical variable. In addition to a categorical variable, I would like to visualize a continuous variable. This could be done by small bars, a curve or simply numbers above the columns. (The Sample names are already located at the bottom.) Does someone have example code for this or a similar problem? Is this so special that I have to get down to the lattice package? Thank you, Hans-Ulrich -- Hans-Ulrich Klein Department of Medical Informatics and Biomathematics Westf?lische Wilhelms-Universit?t M?nster Tel.: +49 (0)251 83-58405
Hello Hans, Do you need *both* a categorical *and* a continuous variable, or just a continuous variable? -Greg On 6/24/08 4:51PM , "Hans-Ulrich Klein" <h.klein at uni-muenster.de> wrote:> Dear All, > > I want to plot a heat map with annotated columns. Both functions heatmap > (stats) and heatmap.2 (gplots) can plot a horizontal side bar that can > be used to visualize a categorical variable. In addition to a > categorical variable, I would like to visualize a continuous variable. > This could be done by small bars, a curve or simply numbers above the > columns. (The Sample names are already located at the bottom.) > > Does someone have example code for this or a similar problem? Is this so > special that I have to get down to the lattice package? > > Thank you, > Hans-Ulrich-- Gregory R. Warnes, Ph.D Program Director Center for Computational Arts, Sciences, and Engineering University of Rochester Tel: 585-273-2794 Fax: 585-276-2097 Email: gregory.warnes at rochester.edu
Gregory Warnes wrote:> Hello Hans, > > Do you need *both* a categorical *and* a continuous variable, or just a > continuous variable? > > -Greg >Hello Greg, I want to visualize survival data above the columns. So my continuous variable is follow up time and my categorical variable indicates the event. As the event has only two states (death or alive), one probably can omit an extra side bar for this variable and represent it by different colors within the plot for the follow up time. If it is easier to place two annotations above the heat map, that would be fine, too. Probably the simplest solution is: Just plot numbers (follow up times) in red (death) or blue(alive) above the columns. (Analogous to the sample names under the columns.) I do not know how to do this. Regards, Hans-Ulrich> On 6/24/08 4:51PM , "Hans-Ulrich Klein" <h.klein at uni-muenster.de> wrote: > > >> Dear All, >> >> I want to plot a heat map with annotated columns. Both functions heatmap >> (stats) and heatmap.2 (gplots) can plot a horizontal side bar that can >> be used to visualize a categorical variable. In addition to a >> categorical variable, I would like to visualize a continuous variable. >> This could be done by small bars, a curve or simply numbers above the >> columns. (The Sample names are already located at the bottom.) >> >> Does someone have example code for this or a similar problem? Is this so >> special that I have to get down to the lattice package? >> >> Thank you, >> Hans-Ulrich >> > >-- Hans-Ulrich Klein Department of Medical Informatics and Biomathematics Westf?lische Wilhelms-Universit?t M?nster Tel.: +49 (0)251 83-58405
Hello Hans, I put an example for heatmap.2 with colored dendrograms and additional text under http://www.stamats.de/Heatmap.R hth, Matthias Hans-Ulrich Klein wrote:> Gregory Warnes wrote: >> Hello Hans, >> >> Do you need *both* a categorical *and* a continuous variable, or just a >> continuous variable? >> >> -Greg >> > Hello Greg, > > I want to visualize survival data above the columns. So my continuous > variable is follow up time and my categorical variable indicates the > event. As the event has only two states (death or alive), one probably > can omit an extra side bar for this variable and represent it by > different colors within the plot for the follow up time. If it is > easier to place two annotations above the heat map, that would be > fine, too. > > Probably the simplest solution is: Just plot numbers (follow up times) > in red (death) or blue(alive) above the columns. (Analogous to the > sample names under the columns.) I do not know how to do this. > > Regards, > Hans-Ulrich > >> On 6/24/08 4:51PM , "Hans-Ulrich Klein" <h.klein at uni-muenster.de> wrote: >> >> >>> Dear All, >>> >>> I want to plot a heat map with annotated columns. Both functions >>> heatmap >>> (stats) and heatmap.2 (gplots) can plot a horizontal side bar that can >>> be used to visualize a categorical variable. In addition to a >>> categorical variable, I would like to visualize a continuous variable. >>> This could be done by small bars, a curve or simply numbers above the >>> columns. (The Sample names are already located at the bottom.) >>> >>> Does someone have example code for this or a similar problem? Is >>> this so >>> special that I have to get down to the lattice package? >>> >>> Thank you, >>> Hans-Ulrich >>> >> >> > >-- Dr. Matthias Kohl www.stamats.de