K@m@l نشر 15 ديسمبر 2015 أرسل تقرير مشاركة نشر 15 ديسمبر 2015 لدي هذا الكود على LaTeX:\documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz,amsmath} \usetikzlibrary{arrows}% \usepackage[np,autolanguage]{numprint} \begin{document} \begin{tikzpicture}% \draw[step=1cm,black,thin] (0,0) grid (5,5); %\foreach \x in {0, 1,...,5} { \node [anchor=north] at (\x,-0.2) {0.0}; } %\foreach \y in {0, 1,...,5} { \node [anchor=east] at (-0.2,\y) {\y}; } \node at (-0.5,0) {0.0}; \node at (-0.5,1) {0.2}; \node at (-0.5,2) {0.4}; \node at (-0.5,3) {0.6}; \node at (-0.5,4) {0.8}; \node at (-0.5,5) {1.0}; \node at (0,-0.5) {0.0}; \node at (1,-0.5) {0.2}; \node at (2,-0.5) {0.4}; \node at (3,-0.5) {0.6}; \node at (4,-0.5) {0.8}; \node at (5,-0.5) {1.0}; \draw [fill=black, thin] (0.5,2.5) circle [radius=0.05]; \draw [fill=black, thin] (1.5,0.5) circle [radius=0.05]; \draw [fill=black, thin] (2.5,4.5) circle [radius=0.05]; \draw [fill=black, thin] (3.5,1.5) circle [radius=0.05]; \draw [fill=black, thin] (4.5,3.5) circle [radius=0.05]; \end{tikzpicture}% \end{document}ما أريد فعله هو إدراج جدول بأرقام على جانبيه الأسفل والجانبي، مع إضافة نقط سوداء في بعض الخانات، فكيف أفعل ذلك؟ اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
0 E.Nourddine نشر 16 ديسمبر 2015 أرسل تقرير مشاركة نشر 16 ديسمبر 2015 كل ما في الأمر أنك تحتاج إلى حلقات تكرار foreach كتلك المُستعملة في مجال البرمجة، وباختصار نستعملها لتكرار وظيفة ما أوشيفرة، بهذا الشكل:% arara: pdflatex \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[step=1cm,black,thin] (0,0) grid (5,5); \foreach \xtick in {0,...,5} {\pgfmathsetmacro\result{\xtick * .2} \node at (\xtick,-0.5) {\pgfmathprintnumber{\result}}; } \foreach \ytick in {0,...,5} {\pgfmathsetmacro\result{\ytick * .2} \node at (-.5,\ytick) {\pgfmathprintnumber{\result}}; } \foreach \x/\y in {.5/2.5, 1.5/.5, 2.5/4.5, 3.5/1.5, 4.5/3.5}{\draw [fill=black, thin] (\x,\y) circle [radius=0.05];} \end{tikzpicture} \end{document}مما سينتج عنه الجدول التالي:إذا أردت رسم المزيد من البيانات على الجدول، استعمل الدالة pgfplots:\documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis}[ ,x=5cm,y=5cm ,grid=major ,major grid style={thick,black} ,xmin=0, xmax=1 ,ymin=0, ymax=1 ] \addplot[black, mark=*, only marks] table { .1 .5 .3 .1 .5 .9 .7 .3 .9 .7 }; \end{axis} \end{tikzpicture} \end{document} اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
السؤال
K@m@l
لدي هذا الكود على LaTeX:
ما أريد فعله هو إدراج جدول بأرقام على جانبيه الأسفل والجانبي، مع إضافة نقط سوداء في بعض الخانات، فكيف أفعل ذلك؟
رابط هذا التعليق
شارك على الشبكات الإجتماعية
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.