# 1) define "blue-white-red" colormap
palette.name <- visColormap(colormap="bwr")
# 2) use the return function "palette.name" to generate 10 colors spanning "bwr"
col <- palette.name(10)
# 3) add transparent (alpha=0.5)
cols <- visColoralpha(col, alpha=0.5)
Run the code above in your browser using DataLab