So I am creating heatmaps and I would like the lower end of the colour scale to be transparent in the plot.
For the sake of reproducibility lets use the volcano data set as our example.
p <- plot_ly(z = volcano, type = "heatmap", colors = c("blue", "blue", "green", "yellow",
"orange", "red", "red", "red", "red", "red", "red"))
I would like to change both the blue values to be completely transparent colors.
Note: I don't want slightly less opaque blues, I would like a completely transparent color.
So far I have tried to use the rgb()
function and setting the alpha
variable to the value 0 and 1, however this has no effect on the color when the heatmap is printed to the Viewer.
Any help would be appreciated, Thanks