R plot with plotly: Changing value on scale for 2dHeatMap

Viewed 47

I used the following lines to plot a heatmap with plotly in R:

plot_ly(data, x , y) %>% add_trace(type='histogram2dcontour')

I then obtained the following plot 1

The data actually looks like that on a scatter plot 2

As you can see, I lose a lot of points on the heatmap. I was wondering how I could manually set the scale for the colour of the heatmap for e.g. making it so that the colour changes every time the count increase by 10 instead of 100.

Otherwise, is there a better way to plot and visualize such data?

0 Answers
Related