Changing the upper limits for scale_fill_gradient2
also effects the colorscaling for values < 0 as the color distribution around 0 seems to be always symmetrically, is there a way to get a asymmetric distribution of color values?
Here a minimal example of a plot using geom_tile()
:
data <- read.csv("http://protzkeule.de/data.csv")
p <- ggplot(data = data, aes(x = variable, y = meas)) + geom_tile(aes(fill = value))
plot with symmetrical limits:
p + scale_fill_gradient2(low = "blue", mid = "white", high = "red", guide = "colorbar",
limits = c(-0.1, 0.1))
but when changing the upper limit, the lower colormapping changes as well (watch the colorbar):
p + scale_fill_gradient2(low = "blue", mid = "white", high = "red", guide = "colorbar",
limits = c(-0.1, 0.3))
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…