Font problems when exporting box plot with Greek letters
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everyone,
I am trying to graph a box plot with tick-labels that include greek letters and with the entire text being in font 'Times New Roman'. When I execute the following example code, Matlab produces exactly what I want, however in the exported pdf document, the labels including Greek letters are not produced in Times New Roman. Below I also attach a snapshot of the PDF end-product.
Any suggestions on how I can get the same Times New Roman font and size for all labels, including the ones in Greek letters?
Thanks so much for any advice!
set(0,'defaultAxesFontName', 'Times New Roman')
set(0,'defaultTextFontName', 'Times New Roman')
set(0,'defaulttextfontsize', 12)
DataforBoxplot = rand(10000,5);
figure('units','normalized','outerposition',[0 0 1 1])
Label = {'Base Case' ['Case ' char(945)] ['Case ' char(946)] 'Case r' ['Case ' char(947)]};
boxplot(DataforBoxplot, Label)
title('Example graph')
ylabel('Model output')
xlabel('Model (1-3) and parameter set used')
iptsetpref('ImshowBorder','tight');
export_fig Testfile -pdf -transparent
Here is a close-up of the problem:
0 件のコメント
回答 (1 件)
Abhinaya Kennedy
2024 年 6 月 17 日
You can use the "export_fig" function. (https://www.mathworks.com/matlabcentral/fileexchange/23629). This saves Figure/axes and is reproduced as it appears on screen.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Labels and Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!