اولین بار است که به اینجا می‌آیید؟ راهنمای سایت را بخوانید!
0 رای
474 بازدید

سلام خسته نباشید . من میخوام با pgfplot نمودار رسم کنم. سه تا سوال برام پیش اومده.
اول این‌که چطور بفهمونم متن برچسب‌هام RTL هست ؟
دوم چطور عددها رو فارسی کنم ؟
سوم چطور نمودارام رو افقی کنم به جای عمودی ؟

کد مثالی که تست کردم اینه :

\documentclass[border=10pt]{standalone}
%%%<

\usepackage{verbatim}
%%%>
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\usepackage{xepersian}
\settextfont{IRLotus}
\begin{comment}
:Title: Bar plot
:Tags: 2D;Bar plots;Manual
:Author: Christian Feuersänger
:Slug: bar-plot

Bar plots place horizontal or vertical bars at coordinates. Multiple bar plots
in one axis can be stacked on top of each other or aligned next to each other.
The code is from the PGFPlots 1.10 manual: "4.5.4 Bar Plots".
\end{comment}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
    ybar,
    enlargelimits=0.15,
    legend style={at={(0.5,-0.15)},
      anchor=north,legend columns=-1},
    ylabel={سلام دنیا},
    symbolic x coords={tool8,tool9,tool10},
    xtick=data,
    nodes near coords,
    nodes near coords align={vertical},
    ]
\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
\addplot coordinates {(tool8,1) (tool9,1) (tool10,1)};
\legend{used,understood,not understood}
\end{axis}
\end{tikzpicture}
\end{document}

ولی متن سلام دنیا رو به صورت دنیا سلام نشون میده
enter image description here

فایل(های) پیوست:

1 پاسخ

+1 رای
 
بهترین پاسخ

در هر پرسش باید تنها یک سوال مطرح بشه اما تنها این بار به دو پرسش اول و دوم شما پاسخ می‌دم:
۱- کافیست متن رو داخل \rl{} قرار بدید.
۲- کافیست دستور \setdigitfont{} رو استفاده کنید.
فکر می‌کنم کد اصلاح‌شده‌ی زیر روشن باشه:

\documentclass[border=10pt]{standalone}
%%%<

\usepackage{verbatim}
%%%>
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}
\begin{comment}
:Title: Bar plot
:Tags: 2D;Bar plots;Manual
:Author: Christian Feuersänger
:Slug: bar-plot

Bar plots place horizontal or vertical bars at coordinates. Multiple bar plots
in one axis can be stacked on top of each other or aligned next to each other.

The code is from the PGFPlots 1.10 manual: "4.5.4 Bar Plots".
\end{comment}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
    ybar,
    enlargelimits=0.15,
    legend style={at={(0.5,-0.15)},
      anchor=north,legend columns=-1},
    ylabel={\rl{سلام دنیا}},
    symbolic x coords={tool8,tool9,tool10},
    xtick=data,
    nodes near coords,
    nodes near coords align={vertical},
    ]
\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
\addplot coordinates {(tool8,1) (tool9,1) (tool10,1)};
\legend{used,understood,not understood}
\end{axis}
\end{tikzpicture}
\end{document}

و خروجی:
enter image description here

پرسیدن سوال
وب‌سایت پرسش و پاسخ پارسی‌لاتک جایی برای پرسش و پاسخ درباره سیستم حروف‌چینی لاتک و بسته زی‌پرشین است. در اینجا می‌توانید سوال‌های خود را بپرسید و به سوال‌های دیگران پاسخ دهید.

7.1k پرسش

6.6k پاسخ

23.5k نظر

7.3k کاربر

محبوب‌ترین برچسب‌ها

رفع خطا جدول xepersian مراجع ریاضی‌نویسی شکل bidi فونت فهرست مطالب شماره‌گذاری منابع پانویس بیب‌تک tikz تک‌لایو parsilatex بیمر اسلاید زی‌پرشین پاورقی bibtex سربرگ نماد رسم شکل فرمول‌نویسی ارجاع‌دهی biditexmaker هدر ویرایشگر قالب beamer واژه‌نامه اندازه فونت texstudio عنوان فصل ماتریس اعمال نشدن تغییرات در پی‌دی‌اف رسم جدول شماره صفحه bidipresentation حاشیه رنگ عنوان شکل اسلاید فارسی محیط قضیه گراف مکان شکل tikzpicture enumerate حروف‌چینی کد شماره فصل tabriz_thesis نمایه align زیرنویس شکل کادر itemize فهرست اشکال الگوریتم عدم اجرا listings نیم‌فاصله متن لاتین و فارسی بسته فاصله بین خطوط قالب پایان‌نامه فرمول نصب تک‌لایو فارسی‌تک hyperref شماره فرمول glossaries کپشن نمودار خروجی لاتک حروف‌چینی چندستونی فونت فارسی و انگلیسی ماکرونویسی biditools شماره پاورقی پیوست‌ سوال امتحانی فاصله‌گذاری فرمول چندضابطه‌ای extrafootnotefeatures subfigure biditufte-book header texmaker pdf خطا tex longtable تصویر شمارنده زیرنویس texlive2015 دیاگرام رسم نمودار شماره‌گذاری صفحات پایان نامه فهرست جداول میک‌تک texlive2016 تنظیم جدول آکولاد شعر kashida بولد تورفتگی texworks caption اندیس اعداد فارسی lollipop iust-thesis multicol فصل‌نویسی سوال چهارگزینه‌ای فاصله عمودی pgfplots xindy چپ‌چینی اوبونتو میکروسافت ورد قاب geometry xelatex texlive fancyhdr وسط‌چینی تک لایو 2015 tcolorbox عنوان بخش شماره گذاری به‌روزرسانی بسته aimc46 صفر توخالی فرمول طولانی بیرون‌زدگی کاما پوستر فاصله سطرها نوشتافت شکست خط tex-programming فونت اعداد قرآن tabriz-thesis
...