I have a Dashboard using Dash 1.18.1, Plotly 4.14.1, and Python 3.8.5. The Dashboard consists of 3 dcc.Graph objects, all of which are figures created using make_subplots from plotly.subplots.
To save space and make things a little cleaner I am setting the axis title “standoff” attribute to 0 like this:
fig.update_layout(
yaxis=dict(title=dict(text="count", standoff=0.0), range=[0, 75]),
xaxis=dict(title=dict(text="Internal Resistance (Ohms)", standoff=0.0), range=[0, 0.400]),
xaxis2=dict(title=dict(text="Discharge Throughput (MWh)", standoff=0.0), range=[-1, 41]),
yaxis2=dict(title=dict(text="Delta I (Amps)", standoff=0.0), range=[0, 120]),
legend=dict(orientation="v"),
barmode='overlay'
)
If i directly plot this figure using plot from plotly.offline, my defined standoff setting works as expected:
but when i feed this figure as an input to one of my dcc.Graph objects, it seems to reset the standoff to its default value.
Has anyone else experienced this? Is there a work around to shrink the distance between the axis titles and the axes?
Thanks!