I am using plotly graphing library to create some some bar and scatter plot. When I run the app locally, the plots look fine, however, when pushed to production, the top portion of the charts is getting cut off.
Here’s what it looks like for comparison:
The code is exactly same for both. The title is not visible in second plot. How would I fix it?
@app.callback(Output('price-graph', 'figure'), [ Input('select', 'value') ] ) def update_price(val): if val: X = dff['Col1] Y = dff['Co2'] fig1 = go.Figure( data=[go.Scatter( x=X, y=Y, mode='markers', name='observations' ), go.Scatter( x=X, y=dff['model'], mode='lines', name='model' ), ], layout=go.Layout( title='Price Elasticity of Demand : Commercial Office Properties', xaxis=dict( title='Price ($ SF/Ft.)', tickfont=dict(family='Rockwell', color='crimson', size=14), spikemode='toaxis' ), yaxis=dict( title='Occupancy Rates', showticklabels=True, spikemode='toaxis' ), ) ) return fig1