Bug 7402 - Wishlist: heatmap/image legend
Summary: Wishlist: heatmap/image legend
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: old
Hardware: ix86 (32-bit) Windows 32-bit
: P5 normal
Assignee: Jitterbug compatibility account
URL:
Depends on:
Blocks:
 
Reported: 2004-12-04 05:52 UTC by Jitterbug compatibility account
Modified: 2004-12-07 01:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2004-12-04 05:52:26 UTC
From: epurdom@stanford.edu
Full_Name: Elizabeth Purdom
Version: 1.9.1
OS: Windows XP
Submission from: (NULL) (171.64.102.199)


It would be great if heatmap and/or image had the option of printing a legend
bar on it somewhere that would indicate the ranges given by the colors in the
heatmap (i.e. a very small image rectangle with the same colors as in the
heatmap). Because heatmap is using layout, it seems pretty complicated to add
yourself--I make my own myheatmap command. 

A lesser wish, along the same line, would be that with the optional side bar
colors you could put a legend in the plot somehow. Again, I find it difficult to
do without making your own myheatmap command and modifying the layout. And this
seems easy to do spacewise, because there's a "0" in the layout matrix in the
upper left corner over the row dendogram: e.g.
if(!missing(legend.text)){lmat<-lmat+1}

Clearly the plot could be really crowded if you choose all the options, but at
least you'd have the options, and I think they're the devil to do yourself. And
if you could choose the relative widths of the different parts in the layout
(the widths and heights options in the layout command), overriding the other
options, then you could choose how much of the space goes to the different
components. 

Thanks,
Elizabeth

Comment 1 Jitterbug compatibility account 2004-12-04 07:17:03 UTC
From: Dirk Eddelbuettel <edd@debian.org>
On Sat, Dec 04, 2004 at 12:52:30AM +0100, epurdom@stanford.edu wrote:
> Full_Name: Elizabeth Purdom
> Version: 1.9.1
> OS: Windows XP
> Submission from: (NULL) (171.64.102.199)
> 
> 
> It would be great if heatmap and/or image had the option of printing a legend
> bar on it somewhere that would indicate the ranges given by the colors in the
> heatmap (i.e. a very small image rectangle with the same colors as in the
> heatmap). Because heatmap is using layout, it seems pretty complicated to add
> yourself--I make my own myheatmap command. 

You mean like filled.contour() does?  Try 

     > par(ask=TRUE)
     > examples(filled.contour)
     
Hth, Dirk     

> 
> A lesser wish, along the same line, would be that with the optional side bar
> colors you could put a legend in the plot somehow. Again, I find it difficult to
> do without making your own myheatmap command and modifying the layout. And this
> seems easy to do spacewise, because there's a "0" in the layout matrix in the
> upper left corner over the row dendogram: e.g.
> if(!missing(legend.text)){lmat<-lmat+1}
> 
> Clearly the plot could be really crowded if you choose all the options, but at
> least you'd have the options, and I think they're the devil to do yourself. And
> if you could choose the relative widths of the different parts in the layout
> (the widths and heights options in the layout command), overriding the other
> options, then you could choose how much of the space goes to the different
> components. 
> 
> Thanks,
> Elizabeth
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
If your hair is standing up, then you are in extreme danger.
      -- http://www.usafa.af.mil/dfp/cockpit-phys/fp1ex3.htm

Comment 2 Jitterbug compatibility account 2004-12-07 01:08:32 UTC
From: Elizabeth Purdom <epurdom@stanford.edu>
Yes, that's what I mean. Thanks.
Elizabeth

At 05:17 PM 12/3/2004, Dirk Eddelbuettel wrote:
> > It would be great if heatmap and/or image had the option of printing a 
> legend
> > bar on it somewhere that would indicate the ranges given by the colors 
> in the
> > heatmap (i.e. a very small image rectangle with the same colors as in the
> > heatmap).
>
>You mean like filled.contour() does?  Try
>
>      > par(ask=TRUE)
>      > examples(filled.contour)
>


Comment 3 Jitterbug compatibility account 2004-12-14 15:37:25 UTC
Audit (from Jitterbug):
Tue Dec 14 09:37:25 2004	ripley	moved from incoming to wishlist