Changing colorbar font family

Hi everyone,

I want to change the font family of the plotly figure to ‘Lato’.

In the example below, the font_family of the main figure is changed to ‘Lato’.

However, the colorbar’s title and tick’s font are not changed.

I also tried to change the titlefont in the colorbar dict option, but it was impossible.

Can anyone tell me how to change the colorbar’s font family?

CODE

data=go.Scatter3d(x=df['kmx'].to_list(),y=df['kmy'].to_list(),z=df['dep'].to_list(),mode='markers',marker=dict(size=args['3d_ms'],color=df['dep'].to_list(),colorscale=args['3d_cmap'],line=dict(width=args['3d_mew']),colorbar=dict(title='Depth',thicknes=20)))


fig.update_layout(scene_aspectmode='data',scene=dict(xaxis_title='Easting (km)',yaxis_title='Northing (km)' ,zaxis_title='Depth (km)'),font=dict(color='black',size=15) ,paper_bgcolor="white",scene_camera=camera,showlegend=False,font_family="Lato")

@handy0718 In marker definition, set:

marker_colorbar_tickfont_family="Arial" #"Open Sherif", etc
1 Like

Thanks! Is it possible to set the colorbar’s font weight in a similar way?

@handy0718 I don’t know what is font weight. Such an attribute doesn’t exist.
Just call/display help(go.scatter3d.Marker.colorbar) and depending on what you understand by font weight you can decide if it has a correspondent (with another name) or not.