How to maintain aspect ratio of axis with 'PlotBoxAspectRatio'

조회 수: 2 (최근 30일)
Rachel Bedder
Rachel Bedder 2019년 1월 8일
편집: Rachel Bedder 2019년 1월 8일
I am trying to change the default settings for all my figures in matlab. I am struggling to maintain a square plot above all other comands.
I currently have (toy example):
set(groot,'defaultAxesXLimMode','manual')
set(groot,'defaultAxesYLimMode','manual')
set(groot,'defaultAxesDataAspectRatioMode','manual');
set(groot,'defaultAxesPlotBoxAspectRatio',[1 1 1]);
figure;
errorbar([1 2],[0.4 0.5],[0.03 0.05])
xlim([0.5 2.5])
This respects the aspect ratio of 1:1 for the x and y data, but I would like it to be 1:1 including the limits of .5 and 2.5 without having the include new data points for the x and y data.
Is there a way to do this?
NOTE I have spent a lot of time looking through questions for this, however it is the first question I have asked here so any comments on how I could ask better questions, or search for answers better are appreciated.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Errorbars에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by