Got a problem with getframe while using 3d plots

2 次查看(过去 30 天)
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