How can you make multi-line axis labels with TeX not left-justified in R2026a?
I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this?I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this? I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this? tex, horizonalalignment MATLAB Answers — New Questions









