Black Lives Matter. Please consider donating to Campaign Zero's mission of ending police violence in America.
https://www.joincampaignzero.org

Change position of chart in grid

Hi, I have a 3D chart that needs kind of a lot of space. However, the whole grid (parent div) is much larger than the actual chart. ! As you can see in the image, there is a lot of space between the Plotly toggle bar and the graph. How can I position the graph that it is closer to the plotly bar?

image|690x269

html.Div([dcc.Graph(id='graph1')], style={"margin-bottom":"-70px"}) #Same problem bottom - but negative margin fixes it.

trace = [go.Surface(
        z = df_sliced1.values,

        colorscale='Rainbow', colorbar={"thickness": 8, "len": 0.5, "title": {"text": "Volume"}})]
    layout = go.Layout(
        height=1000, width=1000, scene = dict(
                    xaxis_title='Order Level - Bid Side[0-9], Ask Side[10-19]',
                    yaxis_title='Time 08.00 until 22.00 (5Min Intervals)',
                    zaxis_title='Volume (Trailing Mean - 30Min)',
                    aspectmode='cube'),
        scene_camera_eye=dict(x=2, y=-1.5, z=1.25),
    )
    return {"data": trace, "layout": layout}

Help much appreciated! Thanks

Hi @Maeaex1, did you use the layout_margin parameter as in https://plot.ly/python/3d-axes/#range-of-axes?

Hi @Emmanuelle, no I didn’t use the layout_margin paramenter yet. But I will play around a little bit and see if I get it done. Thanks for the hint.