how to plot a figure with a title in Farsi or Arabic?

조회 수: 7 (최근 30일)
murtaza
murtaza 2014년 2월 18일
편집: Amir Talebi 2019년 3월 17일
Dear
How can I plot a figure with a title in Farsi. What I want to do is more complex than just simple title, but for now, plotting a simple figure with one Farsi word is satisfactory. Any help is appreciated in advance.
sample code:
figure; title('عکس','FontName','FreeFarsi','FontSize',20);
I have also tried the above code with other fonts, but it did not work either.
x=listfonts slCharacterEncoding('UTF-8'); figure; for i=1:numel(x) display(x{i}) title('عکس','Color','red','FontName','FreeFarsi','FontSize',20) pause end

답변 (3개)

Jos (10584)
Jos (10584) 2014년 2월 18일
If you intend to use the figure in a publication, you can add or edit the text easily in powerpoint, word, adobe etc.
  댓글 수: 1
murtaza
murtaza 2014년 2월 18일
편집: murtaza 2014년 2월 18일
Yes, but the result won't be satisfactory. Besides that, I want to have some legend with Farsi labels. The legend will show what each color represents, and the colors are assigned randomly, so I do not know what the labels refer to; then how can I correct something that I do not know?

댓글을 달려면 로그인하십시오.


javad ebrahimi
javad ebrahimi 2018년 2월 10일
편집: javad ebrahimi 2018년 2월 24일
go to (figure->edit->figure Propertties) and click in ??? so click on More Preperties and change Srting value to عکس

Amir Talebi
Amir Talebi 2019년 3월 17일
편집: Amir Talebi 2019년 3월 17일
Deat murtaza
You can use this codes for title and label. These ara just simple examples. Just type or copy these in 'Command Window'. It seems they don't work in 'Editor' window.
ylabel({'تغییر مکان جانبی نسبی',' (mm)'},'FontWeight','bold','FontSize',12,...
'FontName','Bookman');
title({'نمودار'});
You can apply any changes to your plot using the tabs on plot window especially 'insert'. After adding the hole labels and other requirments, click on 'Generate code' under 'file' tab. There would be all codes you need for your specific setting.

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by