Colorscale text size

Hi!
I haven’t found any tips about how to change tick’s text size for colorbar.
Maybe someone here have an example or a man?

Hi @vanis,

Here is an example, with a custom colorbar font size and color. For more attributes see https://plot.ly/python/reference/#heatmap-colorbar.

import numpy as np
import plotly.graph_objects as go


z = np.random.rand(10,10)
data = [go.Heatmap(
             z=z, 
             colorscale='Greens', 
             reversescale=True, 
             colorbar=dict(thickness=20,
                           ticklen=3, tickcolor='orange',
                           tickfont=dict(size=14, color='orange')))]
layout = go.Layout(template='none', width=400, height=400, paper_bgcolor='black' )
fig = go.Figure(data=data, layout=layout)

heatmap-tickfont-color

3 Likes

I don’t see anything related to the color scale range here??

@mail8 Above your post there is a link to the answer related to range of values to be mapped to a coloscale:
https://community.plotly.com/t/fix-colorscale-range/30613/2.

Oh, now I see it. Thank you.

Dude, @empet, you are the master of plotly config, thanks so much for your numerous hacks, I have learned atleast a dozem things from you! THANK YOU! kudos