Hi,
I tried the "new" geom_raster for displaying some raster maps (created by GIS). The import and transformation to a dataframe into R and the plot in ggplot2 works really fine and was quite easy to do...so far I am really happy. Now the topic of color-schemes and palettes is really new...
I can get a new color gradient for my raster plot with scale_fill_gradient() resp. scale_fill_gradient() for a more customized way, I that correct so far?
Now I just wanted to know if there is a log-scaled color gradient available or is there any option I can set? My raster maps consists of many very small values and only a few large values and to show differences in the small values, such a log.scaled gradient would be very good. Of course the colors at the ends of the gradient are not important at this time (the gradient is showing probability; range from 10^-8 to 10^-1).
Here a small example with log-data (lots of small, few larger ones):
x <- seq(1,100)
df <- expand.grid(x=x, y=x)
df$z <- exp(runif(10000,log(0.00000001),log(100)))
base <- ggplot(df, aes(x, y, fill = z))
base + geom_raster()
Has anyone done similar things so far and can come up with an example of a nice color-palette/gradient?
best regards,
Johannes
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren:
http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a