3D Plot shrinks one dimension when plotting Alphashape

1 visualización (últimos 30 días)
Holden Tranquillo
Holden Tranquillo el 31 de Mayo de 2022
Respondida: Steve Eddins el 31 de Mayo de 2022
Hello All,
In lines 76-81 of this code I am trying to plot alphashapes on a previously defined figure (line 18). However, whenever I plot, the 3rd dimension seems to shrink down the scales change. I want the 3D plot to look like it does before the plot commands starting in line 76 (you can put a pause anywhere between 18 and 76 to see what I mean). Any help would be great. Thanks

Respuestas (1)

Steve Eddins
Steve Eddins el 31 de Mayo de 2022
The plot method for alphaShapes sets the data aspect ratio to [1 1 1].
When your code arrives at line 76, the data aspect ratio is [31.25 1 87.5]. (A convenient way to get or set the data aspect ratio is the function daspect. The plot call on line 76 resets it to [1 1 1].
You can call daspect yourself to set the data aspect ratio as desired. For example, at the end of your code, add this line:
daspect([31.25 1 87.5])

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by