필터 지우기
필터 지우기

Set aspect ratio of stacked plot

조회 수: 2 (최근 30일)
Eric Roden
Eric Roden 2023년 11월 11일
답변: Dyuman Joshi 2023년 11월 11일
Dear colleagues:
I have been searching through the help menus to try to figure out how to set the aspect ratio of a stacked plot, with no success. Can someone share the coding required to do this?
Many thanks, Eric
Eric Roden
Professor of Geoscience
University of Wisconsin-Madison

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 11월 11일
The values in the Position property correspond to [left bottom width height] and the default unit is normalized, w.r.t the whole figure i.e. lower left corner maps to (0,0) and top right corner maps to (1,1)
tbl = readtimetable("outages.csv","TextType","string");
tbl = sortrows(tbl);
figure
h1=stackedplot(tbl);
%Default position values
h1.Position
ans = 1×4
0.2350 0.1100 0.6700 0.8150
figure
h2 = stackedplot(tbl);
AR = 1.5;
width = 0.6;
%Modified values
h2.Position = [0.2 0.1 width AR*width];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by