text

cedwards

·

color gradient

·

Plain Text

·

Total Size: 394 B

·

·

Created: 7 months ago

·

Edited: 4 months ago

require(viridis) color.gradient <- function(x, colors=viridis(256), colsteps=100) { return( colorRampPalette(colors) (colsteps) [ findInterval(x, seq(min(x),max(x), length.out=colsteps)) ] ) } ## example usage plot(x=dat.sum$lat, y=dat.sum$c10.2, pch=15, cex=10, col=color.gradient(dat.sum$ypred), xlab="latex", ylab="c10.2", cex.lab=1.6, main="Effect of traits on clivicolis performance")

0 bits

23 views

Are you sure you want to delete?