MATLAB: How to change the size of a graph/plot to be longer

graphMATLABplotplotting

I have a plot that looks very stretched to the left and right. Is there a way to stretch the graph in the vertical direction?
Thanks!

Best Answer

Try axis options like "axis equal", "axis square", etc. If those don't do it for you then set the position property of the axis, like this:
handleToAxis.Units = 'normalized'; % Or leave as pixels if you want.
handleToAxis.Position = [x, y, width, height]; % If normalized units, all values are between 0 and 1
Related Question