MATLAB: Can you set figure axis properties without using gca as argument to the set command

gcaMATLABsetstructures

I know you can save a structure variable for the current axis using get(gca); however, that structure seems useless except to list items within it.
For example:
axishandle = get(gca); axishandle.XTick
will display the current x-axis tick values on the command line, but both of the following commands are invalid:
set(axishandle.XTick,[0 0.5 1]) set(axishandle.XTick,'XTick',[0 0.5 1])
However,
set(gca,[0 0.5 1])
is valid–so what is the point of being able to assign a handle to the current axis?

Best Answer

you are returning the axes properties as a static structure - which cant be edited in the way you have done it, however you could have done:
axishandle = gca
set ( axishandle, 'Xtick', [0 0.5 1] );
FYI: You could also have done:
axishandle = handle(gca); % returns as a handle object of the axes
axishandle.XTick = [0 0.5 1]
The second way is the way HG2 will work when it gets released (as far as I know).
As a note: When I create axes I save the handle to it - I hardly ever use gca for anything...