Just include colorbar=list(tickfont=list(size=25))
in your chart setup.
I had some problems with your sample code, so this will have to do:
Plot:
Code:
library(plotly)library(tidyr)library(dplyr)p <- plot_ly( x = c(-9, -6, -5, -3, -1), y = c(0, 1, 4, 5, 7), z = matrix(c(10, 10.625, 12.5, 15.625, 20, 5.625, 6.25, 8.125, 11.25, 15.625, 2.5, 3.125, 5, 8.125, 12.5, 0.625, 1.25, 3.125, 6.25, 10.625, 0, 0.625, 2.5, 5.625, 10), nrow = 5, ncol = 5), type = "contour", colorbar=list(tickfont=list(size=25, color='red')), contours = list( start = 0, end = 8, size = 2))p