How to turn off text interpreter when plotting timeseries objects
조회 수: 82 (최근 30일)
이전 댓글 표시
My variable names include underscores (e.g. 'ABC_DEF') and I do not want these interpreted as LATEX (no subscripts).
It works fine on a single plot:
ts = timeseries((1:10)',randn(10,1),'Name','ABC_DEF');
figure
plot(ts)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/391298/image.png)
But when you do subplots the interpreter seems to be set to LaTex:
figure
subplot(2,1,1); plot(ts)
subplot(2,1,2); ts.plot()
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/391303/image.png)
This answer explains how to change the interpreter for individual text commands but I can't find anything on this for timeseries plots.
댓글 수: 0
채택된 답변
Stephen23
2020년 10월 25일
편집: Stephen23
2020년 10월 25일
One approach would be to set the interpreter for the entire figure before plotting (and reset it again afterwards):
For example:
fgh = figure(..);
set(fgh,'defaultTextInterpreter','none')
... create axes and plot data
Depending on the version you are using you might also want to set the axes' TickLabelInterpreter as well.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!