Got a problem with getframe while using 3d plots

2 views (last 30 days)
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

Answers (1)

Jacopo Remondina
Jacopo Remondina on 4 Oct 2018
Edited: Jacopo Remondina on 4 Oct 2018
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

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!