필터 지우기
필터 지우기

set size of axes in cms

조회 수: 23 (최근 30일)
Pankaj
Pankaj 2018년 12월 27일
답변: Image Analyst 2018년 12월 27일
I have a figure containing four subplots. I want to set the height and width of axes either in cm or in pixels.
Can it be done?
Thanks

채택된 답변

Image Analyst
Image Analyst 2018년 12월 27일
You might just have to try it on a monitor and measure it. I mean, if I took a certain graph and showed it on my laptop and simultaneously on a large monitor in a conference room, they would each be a different size in cm, right? So how is your code supposed to know?
You might look up "DPI-Aware Behavior in MATLAB" in the help:
"Root ScreenSize Property
The ScreenSize property of the root object might not match the display size reported by high-DPI Windows systems. Specifically, the values do not match when the Units property of the root object is set to 'pixels'. MATLAB reports the value of the ScreenSize property based on device-independent pixels, not the size of the actual pixels on the screen."
You might check out groot:
>> groot
ans =
Graphics Root with properties:
CurrentFigure: [0×0 GraphicsPlaceholder]
ScreenPixelsPerInch: 96
ScreenSize: [1 1 1920 1080]
MonitorPositions: [1 1 1920 1080]
Units: 'pixels'

추가 답변 (1개)

madhan ravi
madhan ravi 2018년 12월 27일

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by