Displaying a 3D plot oblong instead of squared

When I use the command line below, R plots the X and Y axes as being the same size although they have different ranges.

plot_ly(z = SV) %>% add_surface()

While when using the plotly-implemented example below, the plot is oblong, not squared.

plot_ly(z = ~volcano) %>% add_surface()

Does anyone have an idea how to resolve this issue?

You could set layout.scene.aspectratio.x and y or z to desired values.
Please refer to https://plot.ly/r/reference/#layout-scene-aspectratio-x for more info.