Why is the Reset button of the cameratoolbar changing the proportions and aspect ration of my axes? It is converting it to a cube.
>> mesh(peaks(20))
>> cameratoolbar
>> pbaspect([2 .5 1])

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 6월 20일

0 개 추천

The Reset button of the camera toolbar resets the axes to the structure they had when the "cameratoolbar" function was originally called. To keep your aspect ratio, simply call the "cameratoolbar" after "pbaspect".
>> mesh(peaks(20))
>> pbaspect([2 .5 1])
>> cameratoolbar
Note: The Reset button looks at the axes structure at the time of the FIRST call of "cameratoolbar". Executing:
>> mesh(peaks(20))
>> cameratoolbar
>> pbaspect([2 .5 1])
>> cameratoolbar
will still result in the axes changing to a cube again because the first call comes before the aspect ratio was changed.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

제품

릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by