Weird characters when editing figure
3 ビュー (過去 30 日間)
古いコメントを表示
Hi. I've recently installed MATLAB R2022a and R2017b on a Windows 10 PC. All seems to work fine, but I get weird characters when editing the title or the axis labels of figures.
I’m attaching screenshots of a simple example to highlight the phenomenon. The aspect of the figure is the usual one: the text is completely legible.
However, when double-clicking in the text for editing it, weird/random characters appear instead of the original text.
I get the same behaviour in both versions of MATLAB and don’t why or how to solve it. Any idea?
0 件のコメント
回答 (2 件)
Constantino Carlos Reyes-Aldasoro
2022 年 7 月 7 日
I would suggest that you do not edit the text of figures. The whole idea of using Matlab instead of photoshop/gimp/illustrator is that the whole figure should be created in code. Then, in case you need to modify in the future (and you will in most cases!) you only need to re-run the code. To expand, create a file for the figure, e.g. Fig1.m, and then write there all your steps to generate your desired figure. When finished, just click RUN at the top and the figure should be created. I have written a book about Matlab for image processing and the last chapter is just about how to create publication-quality figures. Have a look:
1 件のコメント
Constantino Carlos Reyes-Aldasoro
2022 年 7 月 7 日
You can also try this link for the book
you may need access from your institution to open the chapters.
Alejandro Bustos
2022 年 7 月 11 日
1 件のコメント
Constantino Carlos Reyes-Aldasoro
2022 年 7 月 11 日
Why don't you add the correct text for every figure in your code? That would certainly be faster than having to click and re-write.
Another way to do this is throught he command line. First grab a handle to the axis:
hAxis = gca;
this grabs the handles and creates and empty figure, then modify the title in the command line:
hAxis.Title.String ='This is figure 1';
And then you can do this without having to click there. Now, one last thing, the text is sometimes interpreted as latex, i.e.
hAxis.Title.String ='This is figure 1 where x^{2}_{1}';
This may be causing you problems if you use symbols that are interpreted in latex, if you do not want that interpretation, use 'interpreter','none':
hAxis.Title.String ='This is figure 1 where x^{2}_{1}';
hAxis.Title.Interpreter = 'none';
Hope this helps solve your problem.
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!