Just an y-axis version of the very useful xticklabel_rotate function
You need to change your function definition to hText = yticklabel_rotate(YTick,rot,yTickLabels,varargin).
I too had the labels on the figure... Fixed it by changing the line:
"x = yLabelPosition(1)+1;"
"x = yLabelPosition(1);"
Same as above...The yaxis labels are placed in the middle of the figure instead of along the left-hand side.
I tried this as a test.
It puts the labels on top of the figure, not to the left of the figure. As well, it dramatically changes the shape of the plot axes for no good apparent reason.
The help seems reasonable, but the above appears to be a significant bug.