nschloe/matlab2tikz — Issue #53: TickLabel handling
Author: CapsLocker
Created: 2011-11-04 14:45:26+00:00
State: open

in getTicks() I had a little problem ...

MATLAB(R) Help says:
Note that tick labels do not interpret TeX character sequences (however, the Title, XLabel, YLabel, and ZLabel properties do).

Now this may be awful if you like to place e.g. pi/2;p;3pi/2 labels on a sine plot ...

I just tweaked the labelInterpreter to 'tex' and had to make sure the ticks are stored in cell arrays. My Code now looks like this:
.......
xTickLabel = get( handle, 'XTickLabel' );
if ~iscellstr(xTickLabel)
xTickLabel = cellstr(xTickLabel);
end
for k = 1:length(xTickLabel)
xTickLabel{k} = prettyPrint( m2t, xTickLabel(k), labelInterpreter);
end
xTickMode = get( handle, 'XTickMode' );
.......
And this for all directions, works for me.

Cheers