\documentclass[fontsize=16pt]{scrbook}
\usepackage[left=1.00cm, right=1.00cm, top=1.00cm, bottom=1.00cm]{geometry}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\makeatletter
\renewcommand{\@makecaption}[2]{%
\begin{center}
\RTL{
\textbf{\textarabic{وثيقة}~\arabic{figure}}~: #2%
}
\end{center}
}
\makeatother
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
% Define data and colors
\def\data{
10/18/{\textarabic{فلاحة}}/red!20,
20/36/{\textarabic{صناعة}}/green!45,
30/54/{\textarabic{خدمات}}/green!20,
40/72/{\textarabic{ضرائب}}/blue!30
}
\def\prevangle{0}
\def\nextangle{0}
\foreach \percent/\angle/\name/\col in \data {
\global\edef\nextangle{\angle+\prevangle}
\draw[fill=\col] (\prevangle:2) arc (\prevangle:\nextangle:2) -- (0,0) ;
\global\edef\prevangle{\angle+\prevangle}
\node[font=\tiny] at ({0.5*\nextangle}:1.5) {\percent\%};
}
\draw (-2,0) -- (2,0);
%legend
\coordinate (legendpos) at (3.5,0); % Define coordinate
\foreach \percent/\angle/\name/\col in \data {
\draw[fill=\col] (legendpos) rectangle ++(0.25,0.25);
\node[right] at ($(legendpos) + (0.2,0.12)$) {\begin{Arabic}\name\end{Arabic}};
\coordinate (legendpos) at ($(legendpos) + (0,0.5)$);
}
\end{tikzpicture}
\caption{\textarabic{الناتج الداخلي الخام لسنة 2024}}
\end{figure}
\end{document}
Leave a comment if you like this content أترك تعليقا إن أعجبك المحتوى
Most viewed courses:
سلسلة تمارين علوم رياضية
Subject: Maths
Class: 2 Bac Science Maths
Views: 47.03K
الحساب المثلثي 1
Subject: Maths
Class: Tronc Commun Sciences
Views: 20.44K
- Série exercices: Calcul Trigonométrique
- Devoir Surveillé 1 Calcul Trigonométrique
- Devoir à la maison 1 Calcul Trigonométrique
- Devoir 2 S02 de généralités des fonctions et trigonométrie
- Devoir Surveillé 1 S02 Calcul Trigonométrique A - B
- Devoir Surveillé 1 S02 Calcul Trigonométrique C - D
- Devoir Surveillé 1 S02 Calcul Trigonométrique E - F
الجداء السلمي وتطبيقاته
Subject: Maths
Class: 1 BAC Science
Views: 18.50K
- Maths
- 1APIC
- 3APIC
- Tronc Commun Sciences
- Tronc Commun Lettres
- 1 BAC Science
- 1 BAC Science Maths
- 1 Bac Lettre
- 2 Bac Science
- 2 Bac Science Maths
- Discussions
- Physics
- 1 BAC Science
- SVT
- 3 Année Collège
- Tronc Commun Sciences
- 1 BAC Science
- 1 BAC Science Maths
- 1 Bac Lettre
- 2 Bac Science
- Latex
- Templates
- Figures
Most Recent Articles
Most Viewed Articles
0 Comments, Latest
No comments yet. Be the first to Comment