Two-line y-label with Latex interpreter not centred properly
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Susan Sun
el 3 de Dic. de 2017
Comentada: Star Strider
el 4 de Dic. de 2017
Hi,
I'd like to make a 2-line y-label in Latex but centred properly. When I try
%
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just \emph{THIS} italicized)'},'interpreter','latex')
%
I get the top plot in the attached screenprint, where the centering is wrong.
I also tried
%
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just THIS italicized)'})
%
and it centres properly, but then I can't selectively italicize the symbol I want - it's all or nothing.
I'm sorry if this is a really dumb question - I would've thought there'd already be an answer, but I can't for the life of me find one.
Thanks for your help!
0 comentarios
Respuesta aceptada
Star Strider
el 3 de Dic. de 2017
This works for me (in R2017b):
figure
plot(0:10,0:10)
ylabel({'line 1 of label','line 2 (Suppose I want just \it{THIS} italicized)'}, 'interpreter','latex')
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Bar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!