Quantcast
Channel: How to change the font size of the tick labels in contour plot colorbar in R? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by vestland for How to change the font size of the tick labels in contour plot colorbar in R?

$
0
0

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:

enter image description here

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

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>