histogram python plotly with title code example
Example: histogram plotly with title
import plotly.graph_objects as go
import numpy as np
x0 = np.random.randn(2000)
x1 = np.random.randn(2000) + 1
fig = go.Figure()
fig.add_trace(go.Histogram(x=x0))
fig.add_trace(go.Histogram(x=x1))
# The two histograms are drawn on top of another
fig.update_layout(barmode='stack')
fig.update_layout(title='<b>Title</b>',
xaxis_title='<b>x</b>',
yaxis_title='<b>y</b>')
fig.show()