XTICKLABEL and LATEX -- still not supported?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlab2010
am 31 Okt. 2013
Beantwortet: Sean de Wolski
am 1 Nov. 2013
I know this was not supported in 2004 -- is it still not?
any work around?
x = 0: 1E-3: 4*pi;
y1= cos(x);
y2 = -sin(x);
plot(y1, 'linewidth',3, 'color','r');
hold all;
plot(y2, 'linewidth',3, 'color','g');
legend('Cos(\phi)','-Sin(\phi)','Location','Best');
grid on;
ylabel('\bf Amplitude');
xlabel('\bf Time');
xlim([0 length(x)]);
xStr = {'0','\pi','2\pi', '3\pi', '4\pi'};
N = length(xStr)-1;
xT = floor(length(x) / N) .* [0:N];
set(gca,'XTICK',xT);
set(gca,'xticklabel',xStr);
%set(gca,'xticklabel',xStr), 'Interpreter', 'latex' ); %would like to run this
0 Kommentare
Akzeptierte Antwort
dpb
am 1 Nov. 2013
Nope, not yet...best you can do is to use text and write the labels manually at the desired locations. Whether somebody has packaged this as a File Exchange submission is probably worth checking for...
0 Kommentare
Weitere Antworten (1)
Sean de Wolski
am 1 Nov. 2013
Will replace with text objects that can then have the interpreter set to 'TeX'
0 Kommentare
Siehe auch
Kategorien
Mehr zu LaTeX finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!