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:
JavaScript
x
7
1
y_layout = {
2
'title': 'y / y_hat comparison',
3
'shapes': y_shapes,
4
'title_font_size': 6,
5
}
6
y_df.iplot(kind='scatter', layout=y_layout)
7
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:
JavaScript
1
6
1
y_layout = {
2
'title': 'y / y_hat comparison',
3
'shapes': y_shapes,
4
'font': {'size': 6},
5
}
6