MATLAB: Efficiently setting lower axis limit

axis

I would like to set the lower axis limit and leave the upper limit at the auto value (rather than specifcy the upper limit myself). At the moment I do this to set the lower limit at zero:
xlim_curr = get(gca,'xlim');
xlim_curr(1) = 0;
set(gca,'xlim',xlim_curr)
Is it possible to do this with a single line of code?
Thanks

Best Answer

One line:
set(gca, 'XLim', [0, get(gca, 'XLim') * [0; 1]])
Or without assuming that the lower limit is 0:
set(gca, 'XLim', get(gca, 'XLim') .* [0, 1] + [lowLimit, 0])
But your three lines are easier to read and faster to debug.