MATLAB: Am I unable to plot a figure at the center of the screen when using multiple monitors in MATLAB

figureMATLABmonitorsmultipleposition;screens

I have multiple monitors connected to my computer, and when I plot a figure, I am unable to see the plot at the center of the screen on one of the monitors.

Best Answer

This behavior can be observed if the multiple monitors used are of different sizes. To avoid this issue with multiple monitors, set the 'DefaultFigureUnits' property of the root object to 'normalized' and set the 'DefaultFigurePosition' property of the root object to a desired value. For example:
set(0,'defaultfigureunits','normalized');
set(0,'defaultfigureposition',[<desired value>]);
figure(1);
plot(1:10);
To use these settings in every MATLAB session, include them in a startup.m file. For more information on using a startup file, type the following at the MATLAB Command Window:
doc startup