Latex Interpreter in X axis

6 visualizzazioni (ultimi 30 giorni)
SASASA
SASASA il 9 Mag 2014
Commentato: SASASA il 9 Mag 2014
Hello there! I have:
bar(data(:,:))
name={'quiero','esto','en','latex'}
set(gca,'xticklabel',name)
And it works... BUTTTT i would need to interpret the string in name as a latex. So if I put '$\rho$' the symbol appears. I'm looking for something like
set(gca,'xticklabel',name,'Interpreter','Latex')
But that ain't working.. Any help? THX in advance..

Risposta accettata

dpb
dpb il 9 Mag 2014
No help, sorry. 'xticklabel' does NOT use the TeX/LaTex interpreter (as you've discovered).
You'll have to write the tick labels manually with text. This is simple enough, just retrieve the 'xtick' values for the x-locations, adjust y location a little from the lower y-axis value and set the '[horziontal|vertical]alignment' properties to place text as desired.
Why TMW chose to not implement TeX for ticks is a mystery as it's clearly a useful and desirable feature.
  1 Commento
SASASA
SASASA il 9 Mag 2014
Ok I see. Well thanks a lot for the answer!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by