Styling distplots

Hey guys,
I have gone through the dist plot api of plotly python but none of the examples contain how to have a paper_bg or embed line plots into distplots through shapes etc other that just have a title. Does anyone know how to do that ?

Hi @ULTRA, welcome to the forums!

Since the figure factories (like create_distplot) return standard plotly.graph_objs.Figure objects, you can customize them before displaying them using standard plotly figure updates. So you can do things like:

import plotly.figure_factory as ff
from plotly.offline import plot
fig = ff.create_distplot(...)
fig.layout.paper_bgcolor = 'red'

Hope that helps,

1 Like

Thanks a lot for the info @jmmease