Hi,
so, I’m plotting a heatmap with a colorbar. I actually had no problems with this plot, but then I updated my Plot_ly package, and now this plot generates a very small colorbar next to my heatmap, no matter what I try to do with it.
Example:
col = c("#00007F", "#0000FF", "#007FFF", "#00FFFF", "#7FFF7F", "#FFFF00", "#FF7F00", "#FF0000", "#7F0000"); f = list(size = 18); plot_ly(data = pred, x = ~distance, y = ~altitude, z = ~ch4, type = 'heatmap', colors = colorRampPalette(col) (length(pred$ch4)), text = paste('<br>Altitude:', round(pred$altitude,2), ' [m]<br>Distance:', round(pred$distance,2),'<br>Enhancement:', round(pred$ch4,1), ' [ppb]<br>'), hoverinfo="text") %>% colorbar(title = 'CH<sub>4</sub> [ppb]') %>% layout(yaxis = list(title = "Altitude [m]", titlefont = f), xaxis = list(title = "Distance [m]", titlefont = f), margin = list(l=80, t=50, b=50, r=40), font=f);
Here’s an image of how this code produced a plot vs. how it produces it now.
If anyone has any idea what I can do to get the colorbar to scale properly again, I’d be very grateful.
Cheers,
T.