Skip to main content
15 events
when toggle format what by license comment
Sep 19, 2013 at 22:52 comment added user25658 I changed the plots to reflect your suggestions to use the filled.contour() and image.plot() option in R
Sep 19, 2013 at 22:51 history edited user25658 CC BY-SA 3.0
added 263 characters in body
Sep 19, 2013 at 22:38 comment added Sycorax FWIW, fields gives the z-axis legend by default, which I find incredibly handy.
Sep 19, 2013 at 22:36 comment added Macro The filled.contour() command is in graphics which I think is part of the basic stuff you get when you download R. image.plot() is in fields.
Sep 19, 2013 at 22:12 comment added Macro While we're here, I'll just point out that you can customize the color palette any way you want... The easiest (but probably not the best) way to do this is using colorRampPalette(), e.g. if you type a = colorRampPalette(c('dark blue','blue','light blue','yellow','orange', 'red','dark red')) it creates a function a that generates a discrete approximation of a color continuum that passes through those colors. The argument to a is an integer that determines the resolution of this discrete approximation.
Sep 19, 2013 at 22:10 comment added gung - Reinstate Monica Mama always told me not to look into the eyes of the sun, @GavinSimpson.
Sep 19, 2013 at 22:07 comment added Gavin Simpson @BabakP Re the colour bar, it may also be easier to plot using lattice (wireframe() and cloud()) or ggplot2 (for the contour/image plot only - £d plots aren't in the Grammar IIRC). They will both handle the colour scale/key for you more nicely than the options in base graphics.
Sep 19, 2013 at 22:07 comment added Gavin Simpson @gung literally ;-) R's image colour palette leaves a lot to be desired...
Sep 19, 2013 at 22:04 comment added user25658 @Macro Thanks! Which package are those commands in?
Sep 19, 2013 at 22:03 comment added Macro I think you want the image.plot() command to add a color bar. Also, filled.contour() generates a similar plot with a color bar added by default.
Sep 19, 2013 at 21:53 comment added gung - Reinstate Monica There is some way, but I don't know off the top of my head--I'd have to figure it out. You could probably get a quick answer on SO though; how to add <this feature> to an R plot is a typical SO Q.
Sep 19, 2013 at 21:50 comment added user25658 @Gung, (or anyone really) do you know if there is a was to add a side bar that tells what the values the colors of the heatmap correspond to? That is of course using the image command.
Sep 19, 2013 at 21:47 comment added gung - Reinstate Monica That heatmap is blinding.
Sep 19, 2013 at 21:36 vote accept CommunityBot
Sep 19, 2013 at 21:26 history answered user25658 CC BY-SA 3.0