I want to build a matrix . To clearly see low values, the code is as follows.
p <- ggplot(data = melt(x))
p + geom_tile(aes(x=Var2,y=Var1,fill = value))
Now, to see the details, I prefer to use a square root scale. But if I change
fill = valueto fill = the sqrt(value)
range of the color gamut will also change (for example, the original c (0,100), now c (0,10)).
What I want is to build sqrt(value), but still use the color barvalue
I checked guide_colorbar(), but there is only an argument about whether to show labels, there are no arguments on how to set your own labels.
source
share