The following code run in 2014a and 2014b produces remarkably different results. I think it's a bug.
figure('Position',[100 100 200 500],'Color','y');
I = imread('rice.png');
gf = getframe(gca);
In 2014a it successfully captures ONLY the current axes:
In 2014b it grabs beyond the axes limits to the extent of the figure:
- The figure "Color" parameter makes no difference - I just used yellow for clarity.
- The axis image line does the damage. Without it both 2014a and 2014b capture only the axes extents (as they should).
Can anyone suggest a workaround that produces identical results in both 2014a and 2014b? I have code that runs on both systems and is expected to produce similar figures using getframe. I understand that there can be pixel border effects when using getframe, these minor differences are fine, but the results shown are major differences that I want to avoid.
And if someone can confirm that they get similar results I'll submit a bugfix request.