with(mtcars, plot(disp, mpg, cex = cscale(hp, rescale_pal())))
with(mtcars, plot(disp, mpg, cex = cscale(hp, rescale_pal(),
trans = sqrt_trans()
)))
with(mtcars, plot(disp, mpg, cex = cscale(hp, area_pal())))
with(mtcars, plot(disp, mpg,
pch = 20, cex = 5,
col = cscale(hp, seq_gradient_pal("grey80", "black"))
))
Run the code above in your browser using DataLab