I use MATLAB R2021b. I have a 10x10 data array and I am using contourf
function to plot the data. By default, MATLAB gives me a figure with 1120x840 pixels.
I know that I can use the command set(gcf, 'position', [700, 700, 100, 100])
to decrease the size of the figure. And I get a figure with 200x200 pixels. I decided to shrink the value in the set
function by half to get a 100x100 figure.
However, when I try to do set(gcf, 'position', [700, 700, 50, 50])
, I got a figure with size 100x160. No matter how much further I decrease the value in the set
function, the second dimension of the figure remained at 160 pixels. And there's no problem with the first dimension -- it can shrink with the value in the set
function.
Does anyone know what's the problem here? My goal is to get a figure with 100x100 pixels.
Thank you very much for any advice!
I am the original poster. I think there is a minimum window size in both Windows and Mac operating systems. 100 pixels are smaller than the minimum windows size, so I cannot generate such a small figure. This should be the answer for my question.