'How can I strech an axis of a plotly plot?

See the image in the link for reference: 1

Even though the figure is pretty wide, the plot itself is way to small. Adjusting the figure size however doesn't improve the size of the plot.

Is there a way to strech the xaxis for example, to have a wider scatter plot over the whole screen?

Edit: This is the code I used:

fig = px.scatter_3d(data_scatter, x='x', y='y', z='z',
    color=data_scatter['Status'])
fig.show()

1



Solution 1:[1]

You have to play with the aspect ratio:

fig.update_layout({"scene": {"aspectratio": {"x": 2, "y": 2, "z": 0.75}}})

Here are a couple of pictures. The first without setting aspect ratio, the second with the code above:

enter image description here

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Davide_sd