I am using plot_ly
to plot a contour plot. The code is as follows:
X = c(1, 2, 3, 4, 5, 6)Y = c(seq(from = 1, to = 17, by = 1))Z = matrix(runif(17*6), ncol=17)m <- list(colorbar=list(title = "hi"))plot_ly( x = X, y = Y, z = t(Z), type = "contour", opacity = 100, fillcolor = "FALSE", line = list(width = 1.5), contours = list(showlabels = TRUE, labelfont = list(size = fs, color = 'white')), color = I('black')) %>% layout(xaxis = list(title = "X", titlefont = list(size = fs), ticktext = c("9:00", "9:30", "10:00", "10:30", "11:00", "11:30"), tickvals = c(1, 2, 3, 4, 5, 6), tickmode = "array", tickfont = list(size=fs)), yaxis = list(title = "Y", titlefont = list(size = fs), ticktext = c("0", "30", "60", "90", "120", "150", "180", "210", "240", "270", "300", "330", "360", "390", "420", "450", "480"), tickvals = c(1:17), tickmode = "array", tickfont = list(size=fs)))
The output I get is:
How do I change the font size of the colorbar tick labels (encircled in red)?