✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

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

2 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.