Skip to content
Advertisement

Change title font size in Plotly

I’m trying to update the title font size on my plot using the Plotly library, but it doesn’t works. This is how I defined my layout:

y_layout = {
        'title': 'y / y_hat comparison',
        'shapes': y_shapes,
        'title_font_size': 6,
    }
y_df.iplot(kind='scatter', layout=y_layout)

It correctly set the the title and the shapes, but not the font size.

Advertisement

Answer

I think you can set the title font size using a dictionary:

y_layout = {
        'title': 'y / y_hat comparison',
        'shapes': y_shapes,
        'font': {'size': 6},
    }
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement