diff options
Diffstat (limited to 'obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex')
-rw-r--r-- | obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex | 852 |
1 files changed, 852 insertions, 0 deletions
diff --git a/obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex b/obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex new file mode 100644 index 0000000000..80f4d12084 --- /dev/null +++ b/obsolete/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex @@ -0,0 +1,852 @@ +%!TEX root = /Users/ego/Boulot/TKZ/tkz-graph/doc-fr/TKZdoc-gr-main.tex + +% $Id$ +\section{Modification des styles des sommets} + + +Différentes méthodes sont possibles mais il faut distinguer une utilisation globale ou locale. + +Les trois principaux styles sont \tkzname{VertexStyle}, \tkzname{EdgeStyle} et \tkzname{LabelStyle}. Le dernier est attaché aux étiquettes que peuvent avoir les arêtes. + +\begin{enumerate} +\item \tkzcname{GraphInit} permet de choisir un style prédfini et il est possible de retoucher ces styles en modifiant les valeurs choisies par défaut. +\item Les styles des sommets, des arêtes et étiquettes peuvent être personnalisés avec \tkzname{VertexStyle}, \tkzname{EdgeStyle} et \tkzname{LabelStyle}. On peut redéfinir ces styles avec \tkzcname{tikzset\{VertexStyle/.append style = \{ ... \}\}} ou bien \tkzcname{tikzset\{VertexStyle/.style = \{ ... \}\}}. La première méthode modifie un style existant alors que la seconde définit un style . +\item On peut utiliser les anciennes macros : \tkzcname{SetVertexSimple}, \tkzcname{SetVertexNormal}, \tkzcname{SetUpVertex} et \tkzcname{SetUpEdge} . + +\end{enumerate} + +\medskip +Il est possible de mélanger tout cela en sachant que la dernière définition d'un style l'emporte. + +\medskip +\begin{NewMacroBox}{GraphInit}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{vstyle} {Normal} {} \bottomrule +\end{tabular} + +\medskip +Les possibilités pour \tkzname{vstyle} sont : + +\begin{enumerate} + \item Empty, + \item Hasse, + \item Simple, + \item Classic, + \item Normal, + \item Shade, + \item Dijkstra + \item Welsh, + \item Art, + \item Shade Art. +\end{enumerate} + +\emph{Il y a pour le moment 10 styles pré-définis. Il est possible de modifier les valeurs par défaut.} +\end{NewMacroBox} + + +Utilisation des styles pré-définis + +\begin{enumerate} +\item GraphInit par défaut + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{A}\EA(A){B} + \Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Empty|} + +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Empty] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Hasse|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Hasse] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Simple|} + +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Simple] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Classic|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Classic] + \Vertex[Lpos=-90]{A} + \EA[Lpos=-90](A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + \item GraphInit et \tkzname{|vstyle=Normal|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Classic] + \Vertex[Lpos=-90]{Paris} + \EA[Lpos=-90](Paris){Berlin} + \Edge (Paris)(Berlin) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Shade|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Dijkstra|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Dijkstra] + \Vertex{A}\EA(A){B}\Edge[label=$7$](A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Welsh|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Welsh] + \Vertex[Lpos=-90]{A} + \EA[Lpos=-90](A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Art|} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Art] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Shade Art|} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade Art] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} +\end{enumerate} + +\newpage +\tkzname{|vstyle|} est basé sur les macros suivantes qui peuvent être redéfinies. + +\medskip +\begin{tabular}{lc}\toprule +Commandes pour les styles & utilisation \\ \midrule +|\newcommand*{\VertexInnerSep}{0pt} | &\\ +|\newcommand*{\VertexOuterSep}{0pt} | &\\ +|\newcommand*{\VertexDistance}{3cm} | &\\ +|\newcommand*{\VertexShape}{circle}| &\\ +|\newcommand*{\VertexLineWidth}{0.8pt}| &\\ +|\newcommand*{\VertexLineColor}{black}| &\\ +|\newcommand*{\VertexLightFillColor}{white}| &\\ +|\newcommand*{\VertexDarkFillColor}{black}| &\\ +|\newcommand*{\VertexTextColor}{black}| &\\ +|\newcommand*{\VertexFillColor}{black}| &\\ +|\newcommand*{\VertexBallColor}{orange}| &\\ +|\newcommand*{\VertexBigMinSize}{24pt}| &\\ +|\newcommand*{\VertexInterMinSize}{18pt}| &\\ +|\newcommand*{\VertexSmallMinSize}{12pt}| &\\ +|\newcommand*{\EdgeFillColor}{orange}| &\\ +|\newcommand*{\EdgeArtColor}{orange}| &\\ +|\newcommand*{\EdgeColor}{black}| &\\ +|\newcommand*{\EdgeDoubleDistance}{1pt}| &\\ +|\newcommand*{\EdgeLineWidth}{0.8pt}| &\\ \bottomrule +\end{tabular} + + + +\subsection{Modification de \tkzname{vstyle=Art}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Art] + \renewcommand*{\VertexInnerSep}{8pt} + \renewcommand*{\EdgeLineWidth}{3pt} + \renewcommand*{\VertexBallColor}{blue!50} + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill +\newpage + +\subsection{Modification du style \tkzname{VertexStyle} par défaut} + +Il est possible de redéfinir le style \tkzcname{SetVertexSimple}. + +Par défaut : + +\begin{tkzltxexample}[] +\tikzset{VertexStyle/.style = { + shape = circle, + fill = black, + inner sep = 0pt, + outer sep = 0pt, + minimum size = 8pt, + draw] +\end{tkzltxexample} + +maintenant si on utilise ceci : + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetVertexSimple + \tikzset{VertexStyle/.style = { + shape = rectangle, + fill = red,% + inner sep = 0pt, + outer sep = 0pt, + minimum size = 10pt, + draw}} + \SetGraphUnit{3} + \Vertex{A}\EA(A){B} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Modification d'un style \tkzname{VertexStyle}} + +C'est le style par défaut pour les sommets mais on peut le modifier. Voici quelques exemples utilisés plus tard dans ce document + +par défaut : + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{3} +\tikzset{VertexStyle/.style = {% + shape = circle, + shading = ball, + ball color = Orange, + minimum size = 20pt,draw}} + \SetVertexNoLabel + \Vertex{A}\EA[unit=3](A){B} +\end{tikzpicture} +\end{tkzexample} + + ou bien encore: + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{4} +\tikzset{VertexStyle/.style = {% + shape = circle, + shading = ball, + ball color = green!40!black,% + minimum size = 30pt,draw}} +\SetVertexNoLabel +\Vertex{A}\EA[unit=3](A){B} +\end{tikzpicture} +\end{tkzexample} + \vfill +\newpage + +\begin{NewMacroBox}{SetVertexSimple}{\oarg{local options}} + +\medskip +\emph{Il est possible de modifier les styles prédéfinis. La macro \tkzcname{SetVertexSimple} permet d'affiner le style \og Simple \fg des sommets.} +\begin{tabular}{llc} + \toprule +options & default & definition \\ \midrule +\TOline{Shape} {\textbackslash VertexShape }{} +\TOline{MinSize} {\textbackslash VertexSmallMinSize}{} +\TOline{LineWidth} {\textbackslash VertexLineWidth }{} +\TOline{LineColor} {\textbackslash VertexLineColor }{} +\TOline{FillColor} {\textbackslash VertexFillColor }{} \bottomrule +\end{tabular} +\end{NewMacroBox} + +\medskip +\subsection{Autre style \tkzcname{SetVertexSimple}} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetVertexSimple[Shape=diamond, + FillColor=blue!50] + \Vertices[unit=3]{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzcname{SetVertexSimple}, \tkzname{inner sep} et \tkzname{outer sep}} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{3} +\SetVertexSimple[MinSize = 12pt, + LineWidth = 4pt, + LineColor = red,% + FillColor = blue!60] +\tikzset{VertexStyle/.append style = + {inner sep = 0pt,% + outer sep = 2pt}} +\Vertices{circle}{A,B,C,D,E} +\Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\begin{NewMacroBox}{SetVertexNormal}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{color} {\textbackslash EdgeColor } {} +\TOline{label} {no default } {} +\TOline{labelstyle} {no default } {} +\TOline{labeltext} {\textbackslash LabelTextColor } {} +\TOline{labelcolor} {\textbackslash LabelFillColor } {} +\TOline{style} {no default } {} +\TOline{lw} {\textbackslash EdgeLineWidth } {} + \bottomrule +\end{tabular} + +\medskip +\emph{Macro semblable à la précédente.} +\end{NewMacroBox} + +\subsection{Autre style \tkzcname{SetVertexNormal}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetVertexNormal[Shape = rectangle,% + LineWidth = 2pt,% + FillColor = green!50] + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\begin{NewMacroBox}{SetUpVertex}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{Lpos} {-90 } {position label externe } +\TOline{Ldist} {0cm } {distance du label } +\TOline{style} {{} } {permet d'affiner le style } +\TOline{NoLabel} {false} {supprime le label } +\TOline{LabelOut}{false} {Label externe } \bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de modifier les options précédentes. } +\end{NewMacroBox} + +\subsection{\tkzcname{SetUpVertex}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetUpVertex[Lpos=-60,LabelOut] + \Vertex{A}\EA(A){B} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{\tkzcname{SetUpVertex} et \tkzcname{tikzset}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\SetGraphUnit{4} +\SetVertexLabel +\SetUpVertex[Lpos=-60,LabelOut] +\tikzset{VertexStyle/.append style = + {outer sep = .5\pgflinewidth}} +\renewcommand*{\VertexLineWidth}{6pt} +\Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} + +\vfill\newpage +\section{Modification des styles des arêtes} + +\subsection{Utilisation de l'option \tkzname{style} de la macro \tkzcname{Edge}} + +\subsubsection{Exemple 1} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{e} + \EA(e){f} + \Edge(f)(e) + \Edge[style={bend left}](f)(e) + \Edge[style={bend right}](f)(e) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Exemple 2} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{e} + \EA(e){f} + \Edge[style={->,bend left}](f)(e) + \Edge[style={<-,bend right}](f)(e) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Exemple 3} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{a} + \EA(a){b} + \NO(b){c} + \SetUpEdge[style={->,bend right,ultra thick}, + color=red] + \Edge(a)(b) + \Edge(b)(c) + \Edge(c)(a) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Modification des styles par défaut \tkzcname{SetUpEdge}} + +Cette macro a une action globale et permet de rédéfinir un style. + +\begin{NewMacroBox}{SetUpEdge}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ +\midrule +\TOline{lw} {-90 } {position label externe } +\TOline{color}{\textbackslash EdgeLineWidth} {position label externe } +\TOline{label} {0cm } {distance du label } +\TOline{labelstyle} {{} } {permet d'affiner le style } +\TOline{labeltext} {false} {supprime le label } +\TOline{style}{false} {Label externe } \bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de modifier les options précédentes. } +\end{NewMacroBox} + + +\subsubsection{Utilisation de \tkzcname{SetUpEdge} Exemple 1} +\begin{center} +{ \tikzset{VertexStyle/.style = {shape = circle, + draw = black, + fill = orange, + inner sep = 2pt, + outer sep = 0.5pt, + minimum size = 6mm, + line width = 1pt}} + \tikzset{every to/.style = {line width = 2pt, + color = orange}} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetGraphUnit{4} \SetUpEdge[lw=3pt] + \Vertex{A} + \EA (A){B} \NO (B){C} + \SO (B){D} \EA (B){E} + \Edges(A,B,C,A,D,E,C) + \end{tikzpicture} +\end{tkzexample} +} +\end{center} + + +\subsubsection{Utilisation de \tkzcname{SetUpEdge} Exemple 2} +{ \tikzset{VertexStyle/.style = { + shape = circle, + draw = black, + fill = orange, + inner sep = 2pt, + outer sep = 1pt, + minimum size = 6mm, + line width = 2pt}} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetUpEdge[lw=1.5pt] + \Vertex{A} + \EA(A){B} \WE(A){C} \NO(A){D} + \SO(A){E} \NOEA(A){F} \NOWE(A){G} + \SOEA(A){H} \SOWE(A){I} + \foreach \v in {B,C,D,E,F,G,H,I}{% + \Edge(A)(\v)}; + \end{tikzpicture} +\end{tkzexample} } + +\subsection{Arête avec label \tkzname{LabelStyle}} + + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = + {draw, + shape = circle, + shading = ball, + ball color = green!40!black, + minimum size = 24pt, + color = white}} + \tikzset{EdgeStyle/.style = + {->,bend right, + thick, + double = orange, + double distance = 1pt}} + \Vertex{a} + \EA(a){b} + \NO(b){c} + \tikzset{LabelStyle/.style = + {fill=white}} + \Edge[label=$1$](a)(b) + \Edge[label=$2$](b)(c) + \Edge[label=$3$](c)(a) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Utiliser un style intermédiaire} + +\begin{tkzltxexample}[] + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = Maroon!50, + minimum size = 24pt, + draw}} + \tikzset{TempEdgeStyle/.style = {ultra thick, + double = Maroon!50, + double distance = 2pt}} + \tikzset{LabelStyle/.style = {color = brown, + text=black}} +\end{tkzltxexample} + + +\begin{center} + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = Maroon!50, + minimum size = 24pt, + draw}} + \tikzset{TempEdgeStyle/.style = {ultra thick, + double = Maroon!50, + double distance = 2pt}} + \tikzset{LabelStyle/.style = {color = brown, + text=black}} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture}[scale=.8] + \Vertex{A} + \EA(A){B} \EA(B){C} + \SetGraphUnit{8} + \NO(B){D} + \tikzset{EdgeStyle/.style = {TempEdgeStyle}} + \Edge[label=1](B)(D) + \tikzset{EdgeStyle/.style = {TempEdgeStyle,bend left}} + \Edge[label=4](A)(B) \Edge[label=5](B)(A) + \Edge[label=6](B)(C) \Edge[label=7](C)(B) + \Edge[label=2](A)(D) \Edge[label=3](D)(C) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\section{Changement de couleurs dans les styles prédéfinis} +Trois macros sont proposées + +\subsection{\tkzcname{SetGraphShadeColor}} +\begin{NewMacroBox}{SetGraphShadeColor}{\var{ball color}\var{color}\var{double}} +\emph{\tkzcname{SetGraphShadeColor} permet de modifier les couleurs pour le style \tkzname{Shade}.} +\end{NewMacroBox} + +\subsubsection{Exemple} +Cet exemmple utilise une macrio de \tkzname{tkz-berge}\NamePack{tkz-berge} +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphUnit{4} + \SetVertexNoLabel + \SetGraphShadeColor{red!50}{black}{red} + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} +\end{tkzexample} + +\end{center} + +\newpage +\subsection{\tkzcname{SetGraphArtColor}} +\begin{NewMacroBox}{SetGraphArtColor}{\var{ball color}\var{color}} +\emph{\tkzcname{SetGraphArtColor} permet de modifier les couleurs pour le style \tkzname{Art}.} +\end{NewMacroBox} + +\subsubsection{Exemple} +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetVertexArt + \SetGraphArtColor{green!40!black}{magenta} + \SetGraphUnit{4} + \SetVertexNoLabel + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} + \end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzcname{SetGraphColor}} +\begin{NewMacroBox}{SetGraphColor}{\var{fill color}\var{color}} +\emph{\tkzcname{SetGraphColor} permet de modifier les couleurs pour le style \tkzname{Normal}.} +\end{NewMacroBox} + + +\subsubsection{Exemple avec \tkzcname{SetGraphColor}} +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetGraphColor{yellow}{blue}{maagenta} + \SetGraphUnit{4} + \SetVertexNoLabel + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} + \end{tkzexample} +\end{center} + + + +\newpage + +\subsection{Variation I autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetVertexNormal[Shape = circle, + FillColor = orange, + LineWidth = 2pt] + \SetUpEdge[lw = 1.5pt, + color = black, + labelcolor = white, + labeltext = red, + labelstyle = {sloped,draw,text=blue}] + \Vertex[x=0 ,y=0]{K} + \Vertex[x=0 ,y=2]{F} + \Vertex[x=-1,y=4]{D} + \Vertex[x=3 ,y=7]{H} + \Vertex[x=8 ,y=5]{B} + \Vertex[x=9 ,y=2]{N} + \Vertex[x=5 ,y=0]{M} + \Vertex[x=3 ,y=1]{S} + \tikzset{EdgeStyle/.append style = {bend left}} + \Edge[label = $120$](K)(F) + \Edge[label = $650$](H)(S) + \Edge[label = $780$](H)(M) + \Edge[label = $490$](D)(B) + \Edge[label = $600$](D)(M) + \Edge[label = $580$](B)(M) + \Edge[label = $600$](H)(N) + \Edge[label = $490$](F)(H) + \tikzset{EdgeStyle/.append style = {bend right}} + \Edge[label = $630$](S)(B) + \Edge[label = $210$](S)(N) + \Edge[label = $230$](S)(M) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsection{Variation II autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetVertexNormal[Shape = circle, + FillColor = orange, + LineWidth = 2pt] + \SetUpEdge[lw = 1.5pt, + color = black, + labelcolor = white, + labeltext = red, + labelstyle = {sloped,draw,text=blue}] + \tikzstyle{EdgeStyle}=[bend left] + \Vertex[x=0, y=0]{G} + \Vertex[x=0, y=3]{A} + \Vertex[x=3, y=5]{P} + \Vertex[x=4, y=2]{C} + \Vertex[x=8, y=3]{Q} + \Vertex[x=7, y=0]{E} + \Vertex[x=3, y=-1]{R} + \Edges(G,A,P,Q,E) \Edges(C,A,Q) \Edges(C,R,G) \Edges(P,E,A) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation III autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphUnit{3} + \Vertex{e} + \NOEA(e){f}\SOEA(e){d} + \SOEA(f){h}\NOWE(f){g} + \WE(g){c} \SOWE(e){a} \SOWE(c){b} + \tikzstyle{LabelStyle}=[fill=white] + \tikzstyle{EdgeStyle}=[color=red] + \Edge[label=$3$](a)(b) + \Edge[label=$11$](a)(c) + \Edge[label=$6$](a)(e) + \Edge[label=$17$](a)(d) + \Edge[style={pos=.25},label=$20$](a)(g) + \Edge[label=$5$](c)(b) + \Edge[label=$6$](c)(e) + \Edge[label=$7$](c)(g) + \Edge[label=$7$](f)(e) + \Edge[label=$3$](d)(e) + \Edge[label=$9$](d)(h) + \Edge[label=$6$](g)(e) + \Edge[style={bend left,out=45,in=135},label=$11$](g)(h) + \Edge[label=$4$](f)(h) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation IV autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetUpEdge[lw = 1.5pt, + color = orange, + labelcolor = gray!30, + labelstyle = {draw}] + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{P} + \NOEA(P){B} + \SOEA(P){M} + \NOEA(B){D} + \SOEA(B){C} + \SOEA(C){L} + \tikzset{EdgeStyle/.style={->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) + \tikzset{EdgeStyle/.style={<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style={<->,relative=false,in=0,out=60}} + \Edge[label=$11$](L)(D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation V autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + + \SetUpEdge[lw = 1.5pt, + color = orange, + labelcolor = white] + \GraphInit[vstyle=Normal] \SetGraphUnit{3} + \tikzset{VertexStyle/.append style={fill = red!50}} + \Vertex{P} + \NOEA(P){B} \SOEA(P){M} \NOEA(B){D} + \SOEA(B){C} \SOEA(C){L} + \tikzset{EdgeStyle/.style={->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) + \tikzset{EdgeStyle/.style={<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style={<->,relative=false,in=0,out=60}} + \Edge[label=$11$](L)(D) +\end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput |