"It seems that the order of staking lines in a graph is back-to-front, so blue line will be behind red line."
Those are the only choices. In particular, there is no way of configuring to say that the first line specified in one plot() call should be on top of the second, third, etc., line in the same plot() call. plot() is for creating 2D lines, and axes with only 2D lines default to childorder, and child order for a series of lines drawn in the same plot call is always that the later lines draw over top of the first, same as if you had done a series of plot() calls of individual lines. This is not a default you can change.
You can change the stacking order after you draw everything, such as
set(gca, 'Children', flipud(get(gca, 'Children')) )