Got a problem with getframe while using 3d plots

조회 수: 2 (최근 30일)
Jacopo Remondina
Jacopo Remondina 2018년 10월 2일
편집: Jacopo Remondina 2018년 10월 4일
Hi, I've got some problem using the getframe() function. While called it on a normal 2d plot, it works perfectly and in the way explained in the documentation, but while called it from my code on a 3d axes (view set as 0,90) it start collecting the image of the axes from outside the axes limit and with the proper heigh/width (see attached picture). I had this problem while upgrading the laptop (which include the transitions win 7->win 10 and matlab 2018a->2018b). Any suggestion or confirmation of this problem? Thanks, Jacopo

답변 (1개)

Jacopo Remondina
Jacopo Remondina 2018년 10월 4일
편집: Jacopo Remondina 2018년 10월 4일
UPDATE: It seems that the problem is due to the fact that the primary monitor I'm using has a screen resolution of 1920x1080 (15.6"), and with this, or higher, DPI Microsoft Windows like to scale everything. And, actually, it look better too at human eyes.
But MATLAB do not like it: screen/window positions use a different space then getframe() so the position of the frame and the captured rectangle are not synced resulting in the picture I've posted.
Changing the options in executable properties>compatibility tab>DPI setting doesn't seems to prevent this (to check, use
get(0,'screensize')
) but I had to change the global setting in screen option and set it to 100%.
Any further suggestion (or feedback from MATLAB staff) will be appreciated.
Thanks,
Jacopo

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by