I assume you are using "orient('landscape')" command to set the orientation.
If you are using MATLAB R2016a or newer version, the 'PaperPositionMode' is set to 'auto' by default.
So, the "orient('landscape')" is probably not being reflected. Try to set the 'PaperPositionMode' to 'manual' before setting the paper orientation.
For more information on this property, refer this link: