summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-prob.tex
blob: e2b95aab3e5bbe5a7b8df04a174cfa61d8fd75dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
%!TEX root = /Users/ego/Boulot/TKZ/Graph/doc-fr/TKZdoc-gr-main.tex
% $Id$     
\section{Graphes probabilistes }
%<–––––––––––––––––––––––––– graphes probabilistes ––––––––––––––––––––––––––>
%<–––––––––––––––––——————————————————————————————————————————————————————————>
%<–––––––––––––––––——————————————————————————————————————————————————————————>
\subsection{La macro \tkzcname{grProb} } 
\begin{NewMacroBox}{grProb}{\oarg{local options} \var{left} \var{right} \var{N}\var{S}\var{W}\var{E}}

\begin{tabular}{lll}
Arguments   &   & Définition              \\
  \midrule
  \TAline{Vertex-left} {}{Nom du sommet à gauche}  
  \TAline{Vertex-right} {}{Nom du sommet à droite}  
  \TAline{label N} {}{Étiquette située en haut}  
  \TAline{label S} {}{Étiquette située en bas}   
  \TAline{label W} {}{Étiquette située à gauche} 
  \TAline{label E} {}{Étiquette située à droite} 
 \bottomrule
  \end{tabular}

\medskip
\begin{tabular}{lll}
options & défaut & définition                              \\ 
\midrule
\TOline{unit}      {4cm} {distance entre les sommets      } 
\TOline{LposA}     {180} {angle si label extérieur en A   } 
\TOline{LposB}     {0  }  {angle si label extérieur en B  } 
\TOline{Ldist}     {0cm} {écart entre le node et le label } 
\TOline{LoopDist}  {4cm} {longueur des boucles            }  
\bottomrule
\end{tabular}

\medskip
\emph{Cette macro permet de créer un graphe probabiliste d'ordre 2. }
\end{NewMacroBox}

\subsection{Utilisation de  \tkzcname{grProb} } 

\begin{center}
\begin{tkzexample}[vbox]
\begin{tikzpicture}
  \useasboundingbox (-2.5,-2) rectangle (7.5,2);
  \grProb{A}{B}{NO}{SO}{WE}{EA}
\end{tikzpicture}
\end{tkzexample}
\end{center}  

\begin{tkzexample}[latex=5cm]
\begin{tikzpicture}[scale=.5]
  \useasboundingbox (-2.5,-2) rectangle (5,2);
  \grProb[unit=4]{\Rain}{\Sun}{0,4}{0,3}{0,6}{0,7}
\end{tikzpicture}
\end{tkzexample}
 


                  

\subsection{\tkzcname{grProb} et le style par défaut }
\begin{center}
\begin{tkzexample}[latex=5cm]
\begin{tikzpicture}[scale=.5]
  \useasboundingbox (-2.5,-2) rectangle (5,2);
  \grProb{A}{B}{0,8}{0,6}{0,2}{0,4}
\end{tikzpicture}
\end{tkzexample}
\end{center}

\subsection{\tkzcname{grProb} et le style « Simple »}
\begin{center}
\begin{tkzexample}[latex=5cm]
\begin{tikzpicture}[scale=.5] 
\useasboundingbox (-2.5,-2) rectangle (5,2);
\SetVertexSimple
\grProb[Ldist=0.2cm]{Paris}{Lyon}%
  {\scriptstyle\dfrac{2}{3}}{\scriptstyle\dfrac{3}{4}}%
  {\scriptstyle\dfrac{1}{3}}{\scriptstyle\dfrac{1}{4}}%
\end{tikzpicture}
\end{tkzexample}
\end{center}

\subsection{Utilisation d'un style personnalisé}
\begin{center}
\begin{tkzexample}[vbox]
\begin{tikzpicture}
 \useasboundingbox (-2.5,-2.5) rectangle (7.5,2.5);
 \tikzset{VertexStyle/.style = {shape        = circle, 
                                shading      = ball,
                                ball color    = Orange,
                                minimum size = 20pt,
                                draw,color=white}}
 \tikzset{LabelStyle/.style = {draw,color=orange,fill=white}}
 \tikzset{EdgeStyle/.style = {->, thick,
                              double          = orange, 
                              double distance = 1pt}}

\grProb[Ldist=0.1cm,LposA=0,LposB=180]%
            {Paris}{Lyon}%
            {\scriptstyle\dfrac{2}{3}}{\scriptstyle\dfrac{3}{4}}%
            {\scriptstyle\dfrac{1}{3}}{\scriptstyle\dfrac{1}{4}}%
\end{tikzpicture}
\end{tkzexample}
\end{center}

\vfill
\newpage
\subsection{La macro \tkzcname{grProbThree}}

\begin{NewMacroBox}{grProbThree}{\oarg{local options} \var{right} \var{up}\var{down} \var{rr/ru/rd}\var{uu/ud/ur}\var{dd/dr/du}}

\begin{tabular}{llc}
Arguments   &   & Définition              \\
\midrule
\TAline{Vertex-right} {}{Nom du sommet à droite} 
\TAline{Vertex-up}    {}{Nom du sommet en haut}  
\TAline{Vertex-down}  {}{Nom du sommet en bas}   
\TAline{rr/ru/rd}     {}{arête partant de r vers r etc\dots}  
\TAline{uu/ud/ur}     {}{arête partant de u vers u etc\dots}  
\TAline{dd/dr/du}     {}{arête partant de d vers d etc\dots}  
\bottomrule
\end{tabular}
    
\medskip
\begin{tabular}{llc}
Options & Défaut & Définition                              \\ 
\midrule
\TOline{unit}  {4cm} {distance entre les sommets      }    
\TOline{LposA}     {180} {angle si label extérieur en A   }
\TOline{LposB}     {0  }  {angle si label extérieur en B  }
\TOline{Ldist}     {0cm} {écart entre le node et le label }
\TOline{LoopDist}  {4cm} {longueur des boucles            } 
\bottomrule
\end{tabular}
    
\medskip   
\emph{Cette macro permet de créer un graphe probabiliste d'ordre 3. }
\end{NewMacroBox} 

\subsubsection{Graphe probabiliste d'ordre 3}
\begin{center}
\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}[scale=.75]
 \tikzset{LabelStyle/.style = {draw,fill=white}}
 \grProbThree[unit=4]{\Rain}{\Sun}{\Cloud}
  {0.1/0.3/0.6}{0.2/0.3/0.5}{0.25/0.35/0.4}
\end{tikzpicture}
\end{tkzexample}
\end{center}

\endinput