Why are image dimensions different when usingsaveas andprint commands? Figure size is set to 560x420. Commandsaveas(1,'sa_01','bmp') yields image correct in size. Commandprint(1,'-dbmp256','pr_01.bmp') yields image incorrect in size - 576x432.
PRINT with the dbmp256 device use other coordinates than e.g. the dbmp device. Just set a breakpoint in PRINT and find the line, which changes the units to points and use the PaperPosition value as output size.
"Why" is something that many of us have stopped asking with regards to saveas() and print(). No offense intended to the fine folks at Mathworks, but the challenges associated with those functions have been around a long time, and I have notseen any indication that Mathworks has made updating them to be a priority.
If you want a routine that is much more reliable and which you can customize at need, please see Oliver's contributionexport_fig