Explorer les Livres électroniques
Catégories
Explorer les Livres audio
Catégories
Explorer les Magazines
Catégories
Explorer les Documents
Catégories
Version 0.50
Jean Pierre Casteleyn IUT GTE Dunkerque, France
Objectif : Une image par commande ou par paramtre. Le texte rduit au strict minimum. Le plus complet possible au l de mises jour rgulires. Garder la mme structure que visuel pstricks
Remarques : Le code donn est minimal et ne sert qu montrer les commandes concerns. Voir la documentation pour aller plus loin
Source documentaire : pgfmanual.pdf pour commencer. La liste complte des sources se trouve page 107.
Pour me contacter Vous pouvez me contacter mon e-mail personnel pour me signaler les erreurs que vous avez constats me faire part de vos commentaires, suggestions
\draw
\lldraw
\draw (0,1) arc (90 :0 :2 and 1) \draw (-2,0) arc (180 :-120 :2 and 1) \draw [dotted,line width=1pt] (0,0) ellipse [x radius=2cm,y radius=1cm] ;
1.1
voir page 72
1.2
Path
\draw (0,0) (2,1) (3,3) arc (135 :-20 :1) .. controls (6,0) and (4,0) .. (5,2) sin (6.57,0) cos (7.57,2) ;
2
2.1
[line width=.2cm]
[thin] (0.4pt)
[semithick] (0.6pt)
[thick] (0.8pt)
2.2
Style de ligne
\tikz \draw[solid,ultra thick] (0,0) - - (1,1) ;
[solid]
[dotted]
[densely dotted]
[loosely dotted]
[dashed]
[densely dashed]
[loosely dashed]
[dashdotted]
[densely dashdotted
[loosely dashdotted
[dashdotdotted
[densely dashdotdotted]
[loosely dashdotdotted]
[dash pattern=on .5cm o .3cm on 5pt o 5pt,dash phase=10pt] \tikz \draw[line width=.2cm,double] (0,0) - - (1,1) ;
double
draw=blue,double=red
double distance=.3cm
=\Huge
=
7
\large
2.3
Remplissage
\usetikzlibrary{patterns} \draw[pattern=dots] (0,0) - - (1,1) ;
[pattern=dots]
[pattern=vepointed stars]
[pattern=sixpointed stars]
[pattern=grid]
[pattern=orizontal lines]
[pattern=vertical lines]
[pattern=crosshatch]
[pattern=crosshatch dots]
[pattern=bricks]
[pattern=checkerboard]
2.4
Ombrage
[shading=axis]
[shading=radial
[shading=ball]
[left color=red]
[right color=blue]
[left color=red]
[right color=blue]
2.5
2.5.1
Les extrmits
Charg automatiquement avec Tikz \tikz \draw[->,line width=.2cm,blue] (0,0) - - (1,1) ;
[->]
[<-]
[<->]
[>->]
[-to]
[-to reversed]
[-o]
[-|]
[-latex] 2.5.2
[-latex reversed]
[-stealth]
[-stealth reversed]
Insrer dans le prambule : \usetikzlibrary{arrow} \tikz \draw[-triangle 90,line width=.2cm,blue] (0,0) - - (1,1) ;
[-triangle 90]
[-triangle 90 reversed]
[-triangle 60]
[-triangle 60 reversed]
[-triangle 45]
[-triangle 45 reversed
[-angle 90]
[-angle 90 reversed]
[-angle 60]
[-angle 60 reversed]
[-angle 45]
[-angle 45 reversed]
[-hooks]
[-hooks reversed]
[-[
[(-)]
[)-(] 9
[-*]
[-diamond]
[-open diamond]
[-square]
[-open square]
[-left to]
[-left to reversed]
[-right to]
[-right to reversed]
[-left hook
[-right hook]
[-round cap]
[-butt cap]
[-triangle 90 cap]
[-fast cap]
2.6
Jonction de lignes
\draw[line join=round] (0,0) - - ++(.5,1) - - ++(.5,-1) ;
[line join=round
[line join=bevel]
[line join=miter]
10
3
3.1
:
Les coordonnes
Quadrillage
\draw (0,0) grid (2,2) ; \tikz \draw [step=1mm] (0,0) grid (2,2) ;
[step=1mm]
[rotate=30]
[xstep=.5]
[ystep=.5]
[help lines]
11
3.2
3.2.1
Coordonnes
Systme de coordonnes canvas
Explicite : \ll (canvas cs :x=2cm,y=1.5cm) circle (2pt) ; Implicite : \ll (2cm,1.5cm) circle (2pt) ; 3.2.2 Systme de coordonnes xyz
\draw (0,0) - - (xyz cs :x=1) ; \draw (0,0) - - (xyz cs :y=1) ; \draw (0,0) - - (xyz cs :z=1) ; 3.2.3
\ll (canvas polar cs :angle=45,radius=2cm) circle (2pt) ; \ll (45 :2cm) circle (2pt) ; 3.2.4 Coordonnes barycentriques \node [circle,ll=red !20] at (barycentric cs :A=0.6,B=0.3 ) {X} ; C C D X B A A=0.5,B=0.5,C=.5,D=.5 C D X
B A A=0.2,B=0.4,C=.6,D=.8
12
3.3
\coordinate (centre) at(1.5,1.5) ; \coordinate(A) at (.5,.5) ; \coordinate (B) at (2.5,2.5) ; \ll (centre) circle (3pt) ; \draw[red] (A) rectangle (B) ; voir aussi page 43 3.3.1 Coordonnes relatives un noeud
\node [ll=green !20,] (A) at (1,1) {noeud} ; \ll[red] (node cs :name=A,anchor=south) circle (3pt) ; noeud name=A,anchor=south noeud name=A,anchor=west noeud name=A,anchor=north noeud name=A,anchor=east
\ll[red] (node cs :name=A,angle=0) circle (3pt) ; noeud name=A,angle=0 3.3.2 noeud name=A,angle=-30 noeud nname=A,angle=-90 noeud name=A,angle=-150
A at (1,1 |- 3,3)
at (1,1 -| 3,3)
13
3.4
3.4.1
Position calcule
Position calcule avec le module pgfmath
Explicite : \ll [red] (canvas cs :x=2cm+10pt,y=1.5cm-10pt) circle (3pt) ; Implicite : \ll [red] (2cm+10pt,1.5cm-10pt) circle (3pt) ;
\draw[dashed] (2,2) circle (2) ; \ll [red](2+ 2*cos 30 , 2+2*sin 30) circle (3pt) ; \ll[magenta] (2+2*cos{(120)} , 2+2*sin{(120)}) circle (3pt) ; 3.4.2 Position calcule avec librairy calc
\node (a) at (1,1) {A} ; \ll [red] ($(a) + 2/3*(1cm,0)$) circle (2pt) ; \ll [red] ($(a) + 4/3*(1cm,0)$) circle (2pt) ;
3.4.3
solution=1
solution=2
14
3.5
3.5.1
Coordonnes relatives
Cartsienne relative lorigine relative une position relative la dernire position
15
4
4.1
Les nuds
Dnition des nuds
\draw (1,1) node[ll=red !20] {texte} ;
Par dfaut
node[draw]
node[circle]
node[circle,draw]
[ll=red !20]
[draw]
[circle,ll=red !20]
[circle,draw]
4.2
Liaisons
B B B
A (A)- - (B) B
A (A) |- (B) B
A (A) -| (B) B
16
A controls +(120 :2cm) and +(200 :1cm) B C A D controls +(C) and +(D) \node[draw] (B) at (2,2) {B} edge [->] (A) ; B B
A [->]
A [red]
A [dashed]
17
4.3
texte [below]
[above] texte
[above right]
texte [anchor=north]
[anchor=south] texte
[anchor=south east]
[anchor=south west]
\ll(0,0) circle (2pt) node[above=.3cm] {texte} ; texte texte texte [above=.3cm] texte texte [above left=.3cm] [below left=.3cm] [above right=.3cm] [below=.3cm] [left=.3cm] texte texte [below right=.3cm]] [right=.3cm]] texte
18
\shorthando{ :} 1 \node [draw,label=right :texte] {} \shorthandon{ :} texte texte texte label=right label=left label=above
texte label=below
texte label=45
\ll(0,0) circle (2pt) node[below right=.3cm,draw,label=45 :tiquette] {texte} ; tiquette texte \shorthando{:} \node[circle,draw,blue,pin=texte] {} ; \shorthandon{:} texte texte texte [circle,pin=texte] [circle,pin=60:texte] [circle,pin=right:texte]
1
\tikz[pin position=60] \node [circle,pin=texte] {} ; texte texte [pin position=60] Par dfaut : above
19
4.4
texte texte very near end (pos=0.875.) texte near end (pos=0.75) midway (pos=0.5)
texte
texte texte
at start (pos=0)
tex te
texte
texte
sloped
above
below
\draw(0,0) .. controls (1,2) and (2,1) .. (5,0) node[sloped,midway,allow upside down] {texte} ;
tex
te
texte
texte
sloped
above
below
20
\draw(A) to [bend right] node [bend right] {texte} (B) ; B B B texte A [bend right] A [auto,bend right] texte A
texte
[auto,swap,bend right]
Constructions particulires
\draw[rotate,blue] (0,0) rectangle (2,2) ;
rotate=40
x=1cm,y=0.5cm
xslant=0.75
yslant=0.75
scale=1.5
scale=-1
xshift=0.5cm
yshift=0.5cm
21
6
6.1
6.1.1
dessin directement dans le texte \tikz \Draw (0,0) rectangle(2,2) ;\tikz \Draw (0,0) circle (1) ; 6.1.2 Avec dcalage nul
\tikz[baseline=0pt] \Draw (0,0) rectangle(2,2) ;\tikz[baseline=0pt] \Draw (0,0) circle (1) ; 6.1.3 Avec dcalage ici est inclus le code suivant :
22
6.2
texte avant
texte aprs
texte avant \begin{tikzpicture}[blue] \draw (0,0) rectangle(2,2) ; \draw (0,0) circle (1) ; \end{tikzpicture} texte aprs
texte avant
texte aprs
texte avant \begin{tikzpicture}[blue,baseline=0pt] \draw (0,0) rectangle(2,2) ; \draw (0,0) circle (1) ; \end{tikzpicture} texte aprs
texte avant
texte aprs
texte avant \begin{tikzpicture}[blue,baseline=1cm] \draw (0,0) rectangle(2,2) ; \draw (0,0) circle (1) ; \end{tikzpicture} texte aprs
6.3
Modication du cadrage
\draw [use as bounding box] (1,0) rectangle (2,1) ; \draw[blue] (-1,0) - - (3,1) ; texte avant texte aprs (1,0) rectangle (2,1) texte avanttexte aprs (0,0) rectangle (0,0)
texte avant. \begin{tikzpicture} [trim left=1cm] \draw[blue] (-1,0) - - (3,1) ; \draw[red] (0,0) grid (2,1) ; \end{tikzpicture}texte aprs texte avant. texte aprs [trim left=1cm] texte avant. texte aprs [trim right= 1cm]
23
6.4
Coupure de limage
sans coupure
6.5
Rognage partiel
\tikzpicture[red,scale=.7] \draw[help lines] (-2,-2) grid (2,2) ; \draw[blue] (-1.1,-0.2) rectangle (2,1.5) ; \draw (0,0) circle (1.5) ; \clip (-1.1,-0.2) rectangle (2,1.5) ; \draw (0,0) circle (.5) ; \draw (0,0) circle (1) ; \endtikzpicture
6.5.1
Changement dchelle
Taille normale
\tikzpicture[blue,scale=.5]
24
7
7.1
\begin{tikzpicture}[show background rectangle] \lldraw[ll=yellow] (0,0) ellipse (1 and .5 ) ; \end{tikzpicture} Autre syntaxe : \begin{tikzpicture}[framed]
7.1.1
Options
rounded corners
\begin{tikzpicture}[background rectangle/.style={double,draw=blue},framed]
double
ll=green
top color=green
line width=4pt
rounded corners=0.5cm
7.2
Encadrement partiel
\begin{tikzpicture}[show background top]
25
double
<->
line width=10pt
dashed
7.3
Quadrillage
\begin{tikzpicture}[show background grid] \lldraw[ll=yellow] (0,0) ellipse (2 and 1) ; \end{tikzpicture} Autre syntaxe : \begin{tikzpicture}[gridded]
7.3.1
Style
draw=red
step=.5cm,draw=blue
7.4
Encadrement et quadrillage
\begin{tikzpicture}[framed , gridded ] \lldraw[ll=yellow] (0,0) ellipse (2 and 1) ; \end{tikzpicture}
26
Exemple : commande sans variable : Cration \newcommand{\DFR}{ \tikzpicture[scale=.25] \draw [ll=blue](0,0) rectangle (3,1.5) ; \draw [ll=white](1,0) rectangle (2,1.5) ; \draw[ll=red](2,0) rectangle (3,1.5) ;\endtikzpicture } Utilisation : \DFR
27
9
9.1
9.2
Style variable
\begin{tikzpicture} [mon style/.style={draw=#1,thick,ll=#1 !50,scale=.5}] \lldraw [mon style=red] (0,0) rectangle (2,1) ; \lldraw [mon style=blue] (3,0) rectangle (5,1) ; \end{tikzpicture}
\begin{tikzpicture} [mon style/.style={draw=#1,ll=#1 !20,very thick}, mon style/.default=black] \lldraw [mon style] (0,0) rectangle (2,1) ; \lldraw [mon style=blue] (3,0) rectangle (5,1) ; \end{tikzpicture}
28
10
10.1
10.1.1
texte double
texte dashed
texte red
xt e
texte shading=radial
texte text=red
rotate=45
\tikz \draw node[draw,inner sep=0pt] {texte} ; texte texte inner sep=0pt texte inner sep=1cm inner xsep=1cm Par dfaut : 0.3333em inner ysep=1cm texte
\node [ll=red !20,outer sep=1cm] (A) at (1,1) {texte} ; \ll (node cs :name=A,anchor=east) circle (3pt) ; \ll (node cs :name=A,anchor=south) circle (3pt) ; texte texte
texte
texte
te
outer ysep=1cm
\draw((0,0) node[ll=blue !20,minimum height=1.5cm,draw] {texte} ; texte texte minimum height=1.5cm texte minimum size=1.5cm,draw minimum width=3cm texte minimum size=1.5cm,circle 29
10.2
10.2.1
Formes disponibles
2 syntaxes : \tikz \node[ll=green !20,shape=diamond,draw,blue] {texte} ; \tikz \node[ll=green !20,diamond,draw] {texte} ; texte diamond texte star texte dart 10.2.2 Options \node [trapezium,draw,trapezium left angle=90,draw,blue] {texte} ; texte texte texte trapezium left angle=90 texte minimum height=1.5cm trapezium stretches=true trapezium right angle=90 texte minimum height=1.5cm trapezium stretches=false trapezium angle=120 texte minimum width=1.5cm trapezium stretches
texte ellipse
texte trapezium
kite
texte cylinder
texte texte star points=7 par dfaut : 5 star point height = 2cm Par dfaut.5cm 30
texte
\node [isosceles triangle,isosceles triangle apex angle=90,draw,blue] {texte} ; \node [regular polygon, regular polygon sides=6,draw,blue] {texte} ;
texte texte isosceles triangle apex angle=90 isosceles triangle stretches texte regular polygon sides=6
texte
texte texte
\node [cylinder,aspect=2,draw,blue] {texte} ; texte texte aspect=2 texte cylinder uses custom ll, cylinder end ll=yellow aspect=4 texte cylinder uses custom ll, cylinder body ll=yellow
\draw(0,0) node[shape aspect=1,diamond,draw] {texte} ; texte shape aspect=1 texte shape aspect=2 texte shape aspect=3 texte shape aspect=4
31
10.3
10.3.1
\node[magnifying glass,magnifying glass handle angle=45,draw,blue] {texte} ; texte texte magnifying glass handle angle=45 Par dfaut : -45 magnifying glass handle aspect=3 Par dfaut : 1.5 texte
line width=1ex
texte
texte
texte
\node [starburst,starburst points=5,draw,blue] {texte} ; texte texte starburst points=5 starburst point height=1cm texte random starburst=50
\node [signal,signal pointer angle=45,draw,blue] {texte} ; texte texte texte signal pointer angle=45 signal pointer angle=10 signal pointer angle=300 Par dfaut : signal pointer angle= 90
32
\node [signal,signal to=above,draw,blue] {texte} ; texte texte texte texte signal to=above signal to=below signal to=right signal to=above
\tikz [signal to=nowhere] \node [signal,signal from=above=45,draw,blue] {texte} ; texte texte texte texte signal from=above signal from=below signal from=right signal from=above
texte texte signal from=east , signal to=west signal from=south, signal to=north
\tikz \node [tape, draw,tape bend top=out and in] {texte} ; texte tape bend top=out and in texte tape bend top=none texte tape bend bottom=out and in texte tape bend bottom=out and in tape bend top=out and in texte tape bend bottom=in and in texte tape bend bottom=in and out tape bend top=in and out (Par dfaut )
texte
33
10.4
10.4.1
\node[single arrow,draw,single arrow tip angle=45] {texte} ; \node[single arrow,draw,single arrow head extend=.75cm] {texte} ; texte texte texte texte texte angle=45 angle=120 Par dfaut : single arrow tip angle= 90 extend=.75cm] extend=0cm extend=-1mm Par dfaut : single arrow head extend=0.5cm
\node[minimum size=2cm,single arrow,draw,single arrow head indent=1cm,blue] {texte} ; texte indent=1cm texte indent=10pt texte indent=1ex texte indent=-1ex
\node[minimum size=2cm,double arrow,draw,double arrow tip angle=45] {texte} ; \node[minimum size=2cm,double arrow,draw,double arrow head extend=1ex] {texte} ; \node[minimum size=2cm,double arrow,draw,double arrow head indent=1ex] {texte} ; texte angle=45 texte angle=120 texte extend=1ex texte extend=0 texte indent=1ex
\node [arrow box, draw, arrow box arrows={north :.25cm}] {texte} ; texte {north :.25cm} texte texte texte {east :.25cm}
34
\node [arrow box, draw, arrow box tip angle=45] {texte} ; texte arrow box tip angle=45 Par dfaut : 90 texte arrow box head indent=.25cm Par dfaut : 0cm texte arrow box head extend=.25cm Par dfaut : 0.125cm texte arrow box shaft width=.25cm Par dfaut : 0.125cm
35
10.5
10.5.1
texte
texte
texte
texte
texte
texte
texte
texte
callout pointer shorten=.5cm \node [ellipse callout,draw,callout pointer arc=1] at (0,1.5) {texte} ; texte texte texte
callout pointer arc=1 callout pointer arc=30 callout pointer arc=90 Par dfaut : callout pointer arc=15 \node[draw,cloud callout, aspect=2.5] {texte} ; texte texte texte
cloud pus=5
aspect=2.5
cloud pu arc=120
36
\node [draw,cloud callout,callout pointer start size=.1] {texte} ; texte texte texte
callout pointer start size=.1 start size=.8cm start size=20pt and 1pt Par dfaut : callout pointer start size =.2 of callout texte
texte
texte
callout pointer end size=.5 callout pointer end size=.8cm Par dfaut : callout pointer start size = .1 of callout
37
10.6
10.6.1
formes disponibles texte texte strike out texte rounded rectangle texte chamfered rectangle
Options
Options pour rounded rectangle : \node [draw, rounded rectangle,rounded rectangle arc length=270] {texte} ; texte 270 texte 180 texte 120 texte 90 texte 45
\node [draw, rounded rectangle,rounded rectangle west arc=concave] {texte} ; \node [draw, rounded rectangle,rounded rectangle left arc=concave] {texte} ; texte texte texte texte concave convex none
\node [draw, rounded rectangle,rounded rectangle east arc=concave] {texte} ; \node [draw, rounded rectangle,rounded rectangle right arc=concave] {texte} ; texte texte texte concave convex none
Options pour chamfered rectangle : \node [draw, chamfered rectangle,chamfered rectangle angle=30] {texte} ; texte 10 texte 30 texte 60 Par dfaut : 45 texte 80
\node [draw, chamfered rectangle,chamfered rectangle xsep=10pt] {texte} ; texte xsep=0pt texte xsep=5pt texte texte texte xsep=2cm
\node [draw, chamfered rectangle,chamfered rectangle ysep=10pt] {texte} ; texte ysep=5pt texte ysep=10pt texte ysep=-10pt texte ysep=1cm
texte ysep=0pt
38
\node [draw, chamfered rectangle,chamfered rectangle ysep=10pt] {texte} ; texte sep=5pt texte sep=10pt texte sep=-10pt texte sep=1cm
texte sep=0pt
\node [draw, chamfered rectangle,chamfered rectangle corners=north west] {texte} ; texte north west texte {north east, south east} texte {north east, south west}
39
10.7
\node [circle split,draw,ll=green !20]{haut \nodepart{lower} bas } ; haut haut bas circle split texte 1 texte 2 texte 3 bas circle solidus texte haut texte bas ellipse split rectangle split haut
\node[rectangle split,rectangle split parts=5, draw] {texte 1 \nodepart{second} texte 2 \nodepart{four} texte 3} ; Par dfaut : rectangle split parts=4
\node [rectangle split,rectangle split parts=3,rectangle split horizontal,draw,blue] {texte1\nodepart{two}texte2\nodepart{three}texte3} ; texte 1 texte 2 texte 3
1 2a 2b 2c 3a 3b
\node[rectangle split,rectangle split parts=5, draw] {texte 1 \nodepart{second} texte 2a \\texte 2b \\ texte 2c \nodepart{three} texte 3a \\ texte 3b } ;
\node[rectangle split, draw,blue,minimum size = 2cm,rectangle split draw splits= true] {texte 1 \nodepart{two} texte 2 \nodepart{three} texte 3 \nodepart{four} texte 4} ; texte 1 texte 1 texte 2 texte 2 texte 3 texte 3 texte 4 texte 4 rectangle split draw splits= true Par dfaut rectangle split draw splits= false
\node [rectangle split,rectangle split parts=3,draw,rectangle split ignore empty parts=false] {texte 1 \nodepart{second} \nodepart{third}texte 3} ; texte 1 texte 1 texte 3 texte 3 rectangle split ignore empty parts=false rectangle split ignore empty parts=true
40
\node [rectangle split,rectangle split parts=3,draw,rectangle split empty part depth=1cm] {texte 1 \nodepart{second} \nodepart{third}texte 3} ; texte 1 texte 1
texte 3 rectangle split empty part depth=1cm Par dfaut : 0ex texte 1
rectangle split empty part width=2cm texte 1 texte 2 texte 3 texte 4 texte 3 texte 1 texte 2 texte 4
\node[rectangle split, draw,blue,minimum size = 2cm, rectangle split part align={center, left,right}] {texte 1 \nodepart{two} texte 2 \nodepart{three} texte 3 \nodepart{four} texte 4} ; \node[rectangle split, draw,blue,minimum size = 2cm, rectangle split horizontal, rectangle split part align={center,base, top,bottom}] {texte 1 \nodepart{two} texte 2 \nodepart{three} texte 3 \nodepart{four} texte 4} ;
\node[rectangle split, draw,blue, minimum width=1cm, rectangle split part ll={red, green,cyan}]{} ;
41
10.8
10.8.1
\tikz \draw (0,0) node[ll=blue !10,text width=2cm,text justied] {Ceci est une dmonstration dun texte sur une largeur de 2cm} ; Ceci est une Ceci est une Ceci est une Ceci est une dmonstradmonstradmonstradmonstration dun tion dun tion dun tion dun texte sur texte sur une texte sur texte sur une largeur largeur de une largeur une largeur de 2cm. 2cm de 2cm . de 2cm . sans option Ceci est une dmonstration dun texte sur une largeur de 2cm. text badly ragged Ceci est une dmonstration dun texte sur une largeur de 2cm . align=justify 10.8.2 text justied Ceci est une dmonstration dun texte sur une largeur de 2cm . text badly centered Ceci est une dmonstration dun texte sur une largeur de 2cm . align=ush right text centered Ceci est une dmonstration dun texte sur une largeur de 2cm . align=center Ceci est une dmonstration dun texte sur une largeur de 2cm . align=right text ragged Ceci est une dmonstration dun texte sur une largeur de 2cm . align=ush center Ceci est une dmonstration dun texte sur une largeur de 2cm . align=ush left
Couleur et fontes Texte. Texte. [font=\itshape] Texte. [font=\slshape] Texte. [font=\scshape] Texte. [font=\upshape] Texte. [font=\bfseries]
Texte.
Texte.
Texte.
Texte.
\large
Texte.
\Large
\tiny
\footnotesize
\small Texte.
Texte. Texte.
\huge \Huge
42
10.9
10.9.1
texte
north west
texte
north
texte
north east
texte
text
texte
west
texte
mid west
texte
base west
texte
base
texte
east
texte
mid esat
texte
base east
texte
mid
texte
south east
texte
south
texte
south west
texte
center
texte
0 10.9.2
texte
120
texte
-60
spcique un nud
43
11
11.0.3
\begin{tikzpicture} \draw (0,0) grid (5,3) ; \node [ll=green !20,trapezium,draw] at (1,2) {\DFR } ; 27 \node [draw] at (3,1) {\includegraphics[width=1cm]{tiger} } ; \end{tikzpicture} 11.0.4 En dclarant limage dans pgf
\pgfdeclareimage[width=3cm]{ttt}{tiger} \begin{tikzpicture} \draw (0,0) grid (5,5) ; \draw (3,2) node {\pgfuseimage{ttt}} ; \end{tikzpicture}
44
12
12.1
Dcorations
Library decorations.pathmorphing
\usetikzlibrary{decorations.pathmorphing}
12.1.1
Dcoration lineto
(0,0) - - (2,2)
\draw[decorate,decoration={straight zigzag,meta-segment length=2cm}] (0,0) - - (10,0) ; meta-segment length=2cm amplitude=0.5cm segment length=1cm \draw[decorate,decoration= {straight zigzag,meta-segment length=0.5cm}] (1,1) circle (1) ;
meta-segment length=2cm
amplitude=0.5cm
segment length=5pt
45
12.1.3
(0,0) (2,2)
\draw[decorate,decoration={random steps,segment length=2cm}] (0,0) - - (10,0) ; segment length=2pt segment length=1cm amplitude=0.5cm amplitude=0.5cm ,segment length=1cm \draw[decorate,decoration= {random steps,segment length=2cm}] (1,1) circle (1) ;
2.5pt
amplitude=0.5cm
segment length=5pt
(0,0) - - (2,2)
2.5 pt
46
segment length=5pt
amplitude=0.5cm
(0,0) - - (2,2)
\draw[decorate,decoration={zigzag,meta-segment length=2cm}] (0,0) - - (10,0) ; segment length=0.5cm segment length=2cm amplitude=0.5cm \draw[decorate,decoration= {saw,segment length=20pt}] (1,1) circle (1) ;
2.5 pt
segment length=5pt
amplitude=0.5cm
Dcoration bent
(0,0) - - (2,2)
47
\draw[decorate,decoration={bent,amplitude=0.5cm}] (0,0) (10,0) ; amplitude=0.5cm aspect=0.1 (en bleue) aspect=0.9 (en vert) amplitude=0.5cm
amplitude=1cm 12.1.7
amplitude=0.5cm
aspect=0.25
(0,0) - - (2,2)
\draw[decorate,decoration={bumps,amplitude=0.5cm}] (0,0) - - (10,0) ; amplitude=0.5cm segment length=1cm \draw[decorate,decoration= {bumps,amplitude=10pt}] (1,1) circle (1) ;
amplitude=10pt 12.1.8
amplitude=0.5cm
segment length=20pt
(0,0) - - (2,2)
48
\draw[decorate,decoration={coil,amplitude=0.5cm}] (0,0) - - (10,0) ; amplitude=0.5cm segment length=1cm aspect=0.1 (amplitude=0.5cm) aspect=0.3 aspect=0.9 \draw[decorate,decoration= {coil,amplitude=0.5cm}] (1,1) circle (1) ;
0.5
amplitude=0.5 cm 12.1.9
aspect=0.25 amplitude=0.5cm
Dcoration curveto
(0,0) - - (2,2)
49
amplitude=5pt
amplitude=0.5cm
segment length=5pt
50
12.2
Library decorations.pathreplacing
\usetikzlibrary{decorations.pathreplacing}
12.2.1
(0,0) - - (2,2)
45
amplitude=0.5cm 12.2.2
angle=90 ,amplitude=0.5cm
51
12.2.3
Dcoration expanding waves \draw [dashed,red](0,0) - - (20 :2) ; \draw [dashed,red](0,0) - - (-20 :2) ; \draw [decorate,decoration={expanding waves}](0,0) - - (2,0) ;
(0,0) - - (2,2)
10 pt
52
12.2.6
(0,0) - - (2,2)
10 pt 10 pt
Chemin dcorer \draw [blue,dashed] (0,0) - - (2,1) arc (-20 :135 :1) - - cycle (3,2) .. controls (7,0) and (2,0) .. (5,2) - - (6,2) sin (7.57,0) - - (8,3) - - cycle ;
53
composants linaires lineto : decoration={ show path construction, lineto code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) - - (\tikzinputsegmentlast) ; },}
Fermetures de chemin closepath : decoration={ show path construction, closepath code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) - - (\tikzinputsegmentlast) ; },}
coupure de chemin moveto code : decoration={ show path construction, moveto code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) - - (\tikzinputsegmentlast) ; },}
54
composants courbes curveto : decoration={ show path construction, curveto code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) - - (\tikzinputsegmentlast) ; },}
decoration={ show path construction, curveto code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) - - (\tikzinputsegmentsupporta) ; },}
decoration={ show path construction, curveto code={ \draw [red,ultra thick,->] (\tikzinputsegmentlast) - - (\tikzinputsegmentsupportb) ; },}
decoration={ show path construction, curveto code={ \draw [red,ultra thick,->] (\tikzinputsegmentrst) .. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb) .. (\tikzinputsegmentlast) ; },}
55
12.3
Library decorations.markings
\usetikzlibrary{decorations.markings}
12.3.1
\draw [decorate,decoration={markings,mark=at position 1cm with { \draw[red] (-2pt,-2pt) - - (2pt,2pt) ; \draw[red](2pt,-2pt) - - (-2pt,2pt) ; \draw[red] (-2pt,-2pt) rectangle (2pt,2pt) ; }}] (1,1) circle (1) ;
12.3.2
\draw[decorate,{markings,mark=between positions 0 and 1 step 5mm with ... }] (1,1) circle (1) ; ;
mark= between positions 0 and 1 step 1/10 12.3.3 Marque avec un nud contenant du texte
decoration={markings,mark=at position 1cm with \node[red]{texte}} texte texte texte at position 1cm texte texte at position 1cm/2 at position 0.5/2 at position -0.5/2 at position 0.5 texte at position -1cm
56
12.3.4
\node{\DFR}
\node[transform shape]{\DFR}
2
1
decoration={markings, mark=between positions 0 and 1 step 0.2 with { \node [draw , circle ,ll=white, name= marque-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}, transform shape] {\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}} ;}}
2
1
5
\draw [red,ultra thick] (marque-3) - - (marque-5) ;
12.3.6
0.0pt
decoration={markings, mark=between positions 0 and 1 step 40pt with { \node [red,draw,ellipse,ll=white,font=\tiny] {\pgfkeysvalueof{/pgf/decoration/mark info/distance from start} } ;} } 12.3.7 Nud sur une liaison \draw [decorate,decoration={markings, mark connection node=mon noeud,mark=at position 0.4 with {\node [draw,ellipse,blue,transform shape] (mon noeud) {texte} ;}}] (0,0) (3,2) ; 57
te tex
12.3.8
Arrow Tip Markings \draw[decorate,decoration={ markings,mark=at position 1cm with {\arrow[blue,line width=2mm]{>}} ;}] (1,1) circle (1) ;
{>}
\draw[decorate,decoration={markings,mark=at position 1cm with {\arrowreversed[blue,line width=2mm]{>}} ;}] (1,1) circle (1) ;
{>}
{stealth }
{|}
{diamond}
58
12.4
Library decorations.footprints
\usetikzlibrary{decorations.footprints} \tikz \draw[decorate,decoration=footprints] (0,0) (10,0) ;
foot of = gnome
foot of = bird
foot of = gnome
foot of = human
foot of = bird
59
12.5
12.5.1
Library decorations.shapes
introduction
\draw[decorate,decoration={crosses,segment length=1cm}](0,0) - - (10,0) ; segment length = 1cm shape width = 1cm shape height = 1cm shape size = 1cm 12.5.2
Dcoration shape backgrounds \draw[decorate with=dart] (0,2.5) - - (3,2.5) ; dart star diamond rectangle circle kite
Formes
syntaxe Autre syntaxe dart rectangle cloud star starburst tape kite signal
\draw[decorate,decoration={ shape backgrounds,shape=dart, shape size=.5cm,shape sep=1cm}] (0,0) - - (10,0) ; \draw[decorate with=dart,decoration={shape size=.5cm,shape sep=1cm}] (0,0) (10,0) ;
60
Paramtres : \draw[decorate with=star,star points=3,decoration={shape size=.5cm,shape sep=1cm}] (0,2.5) - - (3,2.5) ; star points=3 star points=4 star points=5 star points=8
\draw[decorate with=star,paint=green,decoration={shape size=.5cm,shape sep=1cm}] (0,2.5) - - (3,2.5) ; paint=green Espacement : double ultra thick star point ratio = 3
Type despacement : \draw[decorate with=dart,decoration={shape size=.5cm, shape sep={1cm,between centers}}] (0,2.5) - - (10,2.5) ; between centers between borders Par dfaut : between centers
Espacement automatique : \draw[decorate with=dart,decoration={shape size=.5cm, shape evenly spread=5}] (0,0) - - (10,0) ; shape evenly spread=5 shape evenly spread=10 Orientation : :
Paramtre shape border rotate shape border rotate=90 shape border rotate=45 shape border rotate=180
Paramtre shape sloped : \draw[decorate with=dart,decoration={shape width=.5cm,shape sep=1cm, shape sloped=true}] (0,0) - - (3,3) ;
shape sloped=true
\draw[decorate with=dart,decoration={shape width=.5cm,shape sep=1cm, shape sloped=true}] (0,0) arc (0 :180 :3 and 2) ;
shape sloped=true shape sloped=false Par dfaut : shape sloped=true \draw[decorate with=dart,decoration={shape width=.5cm,shape sep=1cm, shape border rotate=90,shape sloped=true }] (0,0) - - (3,3) ;
shape sloped=true
shape sloped=false
avec Dimensions :
sans
62
\draw[decorate with=dart,decoration={shape size=.5cm, shape start size=1cm,shape scaled }] (0,2.5) - - (10,2.5) ; shape start size=1cm shape start height=1cm shape start width=1cm shape end size=1cm shape end height=1cm shape end width=1cm
63
12.6
Library decorations.text
\usetikzlibrary{decorations.text}
\draw[decorate,decoration={text along path, text={Un Deux Trois Quatre Cinq Six sept Huit Neuf Dix}}] (1,1) circle (1) ;
nq
S i x se p
Format du texte : \draw [decorate,decoration={text along path, text=avant |\red | texte | | aprs }]
eee texte
a va n
text={ |\red|texte|| }
ee eeeeeeee
ee
text={ |\red|texte|| {} }
a va n
a va n
\draw [decorate,decoration={text along path, text={avant |\Large|Visual |+\bf\color{red}|Tikz|| aprs }}] (1,1) circle (1) ;
pr s
\draw [decorate,decoration={text along path,text format delimiters={[}{]}, text={ [ \red ] texte [ ] }}] (1,1) circle (1) ;
text
a va n
64
a va n
text
te x
ee e e e e eee e
tH
u Un D
text
texte ap
eu x Trois
e
Qu
i atre C
Visual
tt exte apr t
ee ee
texte a
eeeeee
pr s
te
rs
apr
T ik z a
Sens du texte : \draw[decorate,decoration={text along path,text={texte}, text color=blue, reverse path }] (1,1) circle (1) ;
Position du texte : \draw[decorate,decoration={ text along path,text={texte}, text align={align=left}}] (1,1) circle (1) ;
text
e text
text e
align={align=left}
align={align=center}
align={align=right}
\draw[ decorate,decoration={text along path,text={texte}, text align={align=left,left indent=1cm} } ] (1,1) circle (1) ;
align={align=left,left indent=1cm}
Justication du texte : \draw [decoration={text along path, text={Un deux trois quatre }, text align={t to path}}, decorate] (1,1) circle (1) ;
q u a
Justication des espaces : \draw [decoration={text along path, text={Un deux trois quatre }, text align={t to path stretching spaces}}, decorate] (1,1) circle (1) ;
is
ua
treUn
tr eU n
65
tex te
d e u x
deux
texte
t r o i
texte
tro
12.7
Library decorations.fractals
\usetikzlibrary{decorations.fractals} \draw[decorate,decoration=Koch curve type 1] (0,0) - - (3,0) ;
Koch snowake
Cantor set
Koch snowake
Cantor set
Koch snowake
Cantor set
sans
1 decorate
2 decorate
3 decorate
66
12.8
12.8.1
Applications
Dcoration dun nud \node [draw,decorate,decoration={bumps, minimum height=2cm, minimum width=3cm}] {texte} ;
texte
decoration=footprints
Texte
texte Si N xS ept Huit decoration= {text along path,text= {Un Deux Trois Quatre Cinq Six Sept Huit Neuf} }
67
eu f Un
eux at Trois Qu
re Cinq
12.8.3
decoration={zigzag,pre=footprints,pre length=5cm}
decoration={zigzag,post=footprints,post length=5cm}
\draw [decorate,decoration=zigzag] (0,0) (2,0) (2,1) (0,1) cycle ; \draw [decoration=zigzag] (0,0) (2,0) decorate{ (2,1)} (0,1) cycle ; \draw [decorate,decoration=zigzag] (0,0) (2,0) (2,1) decorate{(0,1)} cycle ; \draw [decorate,decoration=zigzag] (0,0) decorate{ (2,0)} (2,1) decorate{(0,1)} cycle ;
68
decoration={zigzag,pre=lineto,pre length=5cm}
decoration={zigzag,post=lineto,post length=5cm}
decoration={zigzag,pre=lineto,pre length=3cm, ,post=curveto,post length=3cm} Dcorations partielles avec curveto : \draw [decorate, decoration={zigzag,pre=curveto,pre length=5cm}](0,0) (10,0) ;
decoration={zigzag,pre=curveto,pre length=5cm}
decoration={zigzag,post=curveto,post length=5cm}
decoration={zigzag,pre=curveto,pre length=3cm, ,post=curveto,post length=3cm} Dcorations partielles avec moveto : \draw [decorate, decoration={zigzag,pre=moveto,pre length=5cm}](0,0) (10,0) ;
decoration={zigzag,pre=moveto,pre length=5cm}
decoration={zigzag,post=moveto,post length=5cm}
69
12.8.6
\begin{tikzpicture}[baseline=0pt,ultra thick, decoration={straight zigzag,amplitude=0.5cm,segment length=1cm}] \draw[red !20,ultra thin] (0,-2) grid (10,3) ; \draw[magenta] (0,2) (10,2) ; \draw[blue,decorate] (0,1) (10,1) ; \draw[red,decorate,decoration=saw] (0,0) (10,0) ; \draw[cyan,decorate,decoration=meta-segment length=2cm] (0,-1) (10,-1) ; \end{tikzpicture} 12.8.7 Tracer le chemin et sa dcoration avec Postaction
\draw [postaction={decorate,blue,draw,ultra thick, decoration={straight zigzag,amplitude=0.5cm}}] [red,line width = 10pt ] (0,0) arc (0 :180 :3 and 2) ;
70
13
13.1
voir page 46 \draw[decorate,decoration={random steps, amplitude=1pt,segment length=3pt}] (0,0) arc (0 :320 :2.5 and 1.5) ;
\draw[decorate,decoration={random steps, amplitude=1pt,segment length=3pt}] plot coordinates (0,0) (1,1) (2,0) (3,1) (4,1) (5,2) ;
71
14
14.1
14.1.1
Crer un graphe
Graphe avec Tikz
Graphe partir dune liste de points
\tikz \draw plot coordinates {(0,0) (1,1) (2,0) (3,1) (4,1) (5,2)} ;
14.1.2
Graphe partir partir dun chier de donnes \tikz \draw plot[mark=x] le {table.dat} ;
[mark=x]
[mark=x,smooth,tension=1]
Contenu du chier table.dat 0.0 0.3 0.3 0.6 0.6 0.9 0.9 1.5 1.2 0.6 1.5 1.2 1.8 1.5 2.1 2.0 2.4 3.0
72
14.1.3
const plot
ycomb
xcomb
only marks
\tikz \draw plot[polar comb,mark=*]coordinates {(0 :1) (60 :0.5) (120 :1.5) (180 :3) (240 :.5) (300 :1) (0 :1)} ; \tikz \draw plot[ybar] le {table.dat} ;
[ybar]
[ybar interval]
[ybar interval,x=2cm]
[ybar interval,y=.5cm]
\begin{tikzpicture} \draw[red,ll=cyan,ybar,bar width=.5cm] plot coordinates {(0,1) (1,1.2) (2,.6) (3,.7) (4,.9)} ; \draw[blue,ll=green,ybar,bar width=.5cm,bar shift=.3cm] plot coordinates {(0,1.2) (1,1.3) (2,.5) (3,.2) (4,.5)} ; \end{tikzpicture}
73
[xbar]
[xbar interval]
[xbar interval,x=.5cm]
[xbar interval,y=.5cm]
74
14.1.4
(\x,\x)
(\x,{sin(\x)}) x en degr
[color=blue,samples=5,mark=*]
[color=blue,domain=0 :4]
[color=blue,samples at={1,2,4,5},mark=*]
({sin(\t)},\t/360,{cos(\t)})
14.2
14.2.1
Marques
Marques avec Tikz
mark=+
mark=x
mark=*
mark=ball
75
[color=blue,mark repeat=3,mark=*]
[color=blue,mark indices=1,4,...,15,17,20,mark=*]
[color=blue,mark size=5pt,mark=*]
mark options={rotate=10},mark=+
\draw[mark=text,text mark=A,mark size=5pt] coordinates {(0,0) (1,1) (2,0)} ; A A A text mark=A Texte Texte Texte text mark=Texte
text mark=\DFR 27
text mark={\includegraphics[width=.5cm]{tiger}}
76
14.2.3
mark=-
mark=|
mark=o
mark=asterisk
mark=star
mark=10-pointed star
mark=oplus
mark=oplus*
mark=otimes
mark=otimes*
mark=square
mark=square*
mark=triangle
mark=triangle*
mark=diamond
mark=diamond*
mark=halfdiamond*
mark=halfsquare*
mark=halfsquare right*
mark=halfsquare left*
mark=pentagon
mark=pentagon*
mark=Mercedes star
mark=halfcircle
mark=halfcircle*
mark=heart
mark=text
mark=halfcircle
mark=halfcircle*
mark=halfdiamond*
mark=halfsquare*
14.3
\draw[color=red] plot[id=sin] function{sin(x)} ; plot[id=sin] cre le chier sin.gnuplot Ouvrir le chier sin.gnuplot avec le programme gnuplot pour crer le chier sin.table Pour les tracs suivant, le chier sin.table sera utilis 77
15
15.1
15.1.1
1 0.8 0.6 0.4 0.2 0
Courbes 2 D
Axes
1 100.4 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 100 100.1 100.2 100.3 100.4 100 0 0.2 0.4 0.6 0.8 1 100 100 100.1 100.2 100.3 100.4 100.2 100.2 100.4
\begin{semilogxaxis} \end{semilogxaxis}
\begin{semilogyaxis} \end{semilogyaxis}
\begin{loglogaxis} \end{loglogaxis}
1 30
1.5 1 0.5 0 0 1 2 3 4 5 6 4 2 0 2 4 6 20
0.5
0 0.5 1 6 4 2 0 2 4 6
10
\addplot gnuplot[id=sin]{sin(x)} ;
25 101.5 20 15 101 10 5 100.4 100.2 100 100.2 100.4 100.6 100.8 100.5 6 4 2 0 2 4 6
axes : semilogxaxis \addplot coordinates {(0,0) (1,1) (2,0) (3,1) (4,1) (5,2)} ;
10 30 8 20 6 10 4 1 0 1 2 3 6 4
10
4 2 0 2 4 6 1 0 1 2 3
\begin{axis}[domain=-1 :3]
\begin{axis}[samples=5]
\begin{axis}[domain=-1 :3,samples=5]
78
25
20
30
35 30
20 15 10
15
20
25
10 20 15 10 6
10 5
4 2 0 2 4 6
5 4 2 0 2 4
ymax=20 15.1.3
ymin=10
xmax=2
xmin=-2
Dimension unitaire en X et Y 35 30 25 20 35 30 25 20 15 10 5 4 2 0 2 4 6 5 0 5
30
20
15 10
10 5 5 0 5 6
\begin{axis}[x=.2cm] 15.1.4
3
\begin{axis}[y=.2cm]
\begin{axis}[x=.2cm,y=.2cm]
Type de graphiques
3 3
const plot
3 3
79
3 4 2
0 1 1.5 2 2.5 3
xbar
3 4 3 2 1 0 0 1 1.5 2 2.5 3 0 0.5 1 2
ybar
3
ybar interval
xbar interval
30 30
xcomb
1 0.5
ycomb
20
20
0 0.5 1
10
10
only marks
scatter
1
mesh
10
quiver=u=1,v=2*x
60 4 40 2 20 2 4
0 6
[stack plots=y,blue]
[stack plots=y,blue]
[ybar stacked,blue]
80
20
10
0 6
20
20
20
10
10
10
\addplot [error bars/y dir=both,error bars/x xed relative =.2] {x2 - x +4} ;
40 60 30 40 20 20 10 0 6 10 20 30
0 6
15.2
15.2.1
1
Habillage du graphe
Titres
Titre du graphe 1 0.8 0.8 0.6 0.4 0.2 0.2 0 0 0.2 0.4 0.6 axe X 0.8 1 0 0 0.2 0.4 0.6 0.8 1 0 0 0.2 0.4 0.6 0.8 1 0.2 axe Y 0.6 0.4 0.6 0.4 0.8 1
\begin{axis}[xlabel=axe X]
\begin{axis}[ylabel=axe Y] 81
\begin{axis}[title=Titre du graphe]
15.2.2
30
Lgende
x2 x + 4 x2 x + 2 x2 x x2 x 2 x2 x 4
20
10
\begin{axis} \addplot {x2 \addplot {x2 \addplot {x2 \addplot {x2 \addplot {x2
x x x x x
+4} ; +2} ; }; -2 } ; -4 } ;
20
10
\begin{axis}[legend entries= {$ x2 - x +4 $,$ x2 - x +2 $,$ x2 - x $,$ x2 - x -2 $,$ x2 - x -4 $} ] \addplot {x2 \addplot {x2 \addplot {x2 \addplot {x2 \addplot {x2 \end{axis} x x x x x +4} ; +2} ; }; -2 } ; -4 } ;
Options
x2 x + 4
30
x2 x + 2 x2 x x2 x 2 x2 x 4
30
20
20
x2 x + 4 x2 x + 2 x2 x x2 x 2 x2 x 4
x2 x + 4 30 x2 x + 2
20
10
10 10
0 0 6
legend style={font=\tiny}
legend style={draw=none}
legend style={shape=ellipse}
x2 x + 4 x2 x + 2 x2 x x2 x 2 x2 x 4
30
30
20 x x+4 x2 x + 2 x2 x x2 x 2 x2 x 4 4 2 0 2 4 6
2
20
10
10
legend style={at={(.5,.5)}}
A C E B D
30
30
20
20
20
10
10
10
82
30
20
x2 x + 4 f(x) x2 x courbe Y
30
20
x2 x + 4 f(x) x2 x courbe Y
30
20
x2 x + 4 f(x) x2 x courbe Y
10
10
10
15.2.3
30 20 10 5 0 height=5cm 5 5 0 5
30 20 10 5 0 5 width=3cm 15.2.4
10
width=3cm,height=5cm
Quadrillage
30 30 30
20
20
20
10
10
10
\begin{axis}[ymajorgrids=true] 3
\begin{axis}[grid=major] 3 2.5
23.99
15.23 1 8.93
83
15.3
15.3.1
Courbes 3D
Axes 5 5 0 5 5 5 0 0 5 5 0 5 5 0 5
5 0 5 5 5 0 0 5 5
5 5
20 0 20 5 5 0 0 5 5
20 0 20 5 5 0 0 5 5
20 0 20 5 5 0 0 5 5
3d box=complete
3d box=complete*
5 5 20 5 5 20 5 5 20 0 20 5 5 0 0 5 5 5 0
5 20 0 20
axis lines*=left
axis lines*=right
5 0 5 5 5 0 {y} 0 5 5
20 0 20 5 5 0 {-x*y} 0 5 5
1 0 1 5 5 0 0 5 5
gnuplot[id=sinxy]{sin(x)*sin(y)} ;
1
4
0.5
2
10 5
1 0.5 0.4 0.6 0.8 1 0
0 0
1 0.5 0.5 1 0
0 0 0.2
0 0 10.5 0 0.5 1 1
le {table3.dat} ;
{sin(x)},{cos(x)},{x/60}) ;
Aspect
5 0 5 5 5 0 [red] 0 5 5
5 0 5 5 5 0 [surf] 0 5 5
5 0 5 5 5 0 [mesh] 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
[red,samples=10]
[surf,samples=10]
[mesh,samples=10]
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
[scatter]
[scatter,samples=10]
[scatter,samples=10,only marks]
85
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
[surf,colormap/greenyellow]
[surf,colormap/hot]
[surf,colormap/jet]
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
[surf,colormap/blackwhite]
[surf,colormap/hot2]
[surf,colormap/bluered]
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
[surf,colormap/cool]
[surf,colormap/redyellow]
[surf,colormap/violet]
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
shader=at
shader=interp
shader=faceted
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
5 0 5 5 5 0 0 5 5
shader=at corner
shader=at mean
shader=faceted interp
86
20 0 20 5 az = -50 0
20 0 20 5
5 0 55
0 el = -50
55
87
16
16.1
16.1.1
\tikz \tkzTabInit{1 ligne /1 , 2 ligne /.5 , 3 ligne /1.5 }{a , b , c } ; Largeur de la premire colonne x a : b c
88
: b c
\tkzTabInit[nocadre]{ x / 1}{ a , b , c } ; Par dfaut : nocadre=false Mise en couleur : \tkzTabInit [color,colorT = yellow]{1ligne/1 , 2ligne/1}{ a , b } 1ligne 2ligne [color,colorT = yellow] 1ligne 2ligne [color,colorL = green] Par dfaut : color = false a b a b 1ligne 2ligne [color,colorC = cyan] 1ligne 2ligne [color,colorV = magenta] colorT=colorC=colorL=colorV =white a b a b
16.2
\tkzTabLine{ z, 2, z ,4 ,z } x f ( x) a 1 b 3 4 c 5
\tkzTabLine{ d, 2, d ,4 ,d }
\tkzTabLine{ 1, h, 3 ,4 ,5 }
89
Exemple x
: + -4 4 10 0 + +
f (x)
16.3
\tkzTabVar{-/1 , -H/2}
90
x f (x) 1
b 2
x f ( x) 1
b 2
\tkzTabVar{D-/1 , +/2} x f ( x) b 2 c
\tkzTabVar{-/1 , -CH/2}
91
x f (x)
a 1 2
b 2
c 3
x f ( x)
a 1 2
b 2
c 3
92
: b 2 c 3
\tkzTabVal{1}{3}{0.25}{A}{x} x a A b c
\tkzTabVal{1}{3}{0.75}{A}{x}
f (x)
\tkzTabIma{1}{4}{2}{x}
\tkzTabIma{1}{4}{3}{x}
93
17
17.1
Les rptitions
Rptition 1 variable
17.2
Rptition 2 variables
Liste de variables numriques
\tikz \foreach \pos/\y in {1/10,2/20,3/30,4/40,5/50,6/60,7/70,8/80,9/90,10/100} \ll[color=blue !\y](\pos,0) circle (0.5cm) ; Variable \pos : position en X Variable \y : couleur Liste de variables mixtes
\tikz \foreach \x/\col in 1/red,3/green,5/magenta,7/blue \shade[ball color=\col](\x,0) circle (1) ; Variable \x : position en X Variable \col : couleur Liste de variables avec un pas 1,3 1,2 1,1 2,3 2,2 2,1 3,3 3,2 3,1 4,3 4,2 4,1 7,3 7,2 7,1 8,3 8,2 8,1 9,3 9,2 9,1 10,3 10,2 10,1
\begin{tikzpicture} \foreach \x in{1,2,...,4,7,8,...,10} \foreach \y in {1,...,3} { \draw (\x,\y) +(-.5,-.5) rectangle ++(.5,.5) ; \draw (\x,\y) node\x,\y ; } \end{tikzpicture} Variable \x : position en X Variable \y : position en Y \x \x \x \x \x \x in in in in in in {1,...,6} {\x, } {1,3,...,11} {\x, } {Z,X,...,M} {\x, } {21,2...,27} {\x, } {0cm,0.5cm,...cm,3cm} {\x, } {A_1,..._1,H_1} {\x, }
Exemples de liste 1, 2, 3, 4, 5, 6, \foreach 1, 3, 5, 7, 9, 11, \foreach Z, X, V, T, R, P, N, \foreach 21 , 22 , 23 , 24 , 25 , 26 , 27 , \foreach 0cm, 0.5cm, 1cm, 1.5cm, 2cm, 2.5cm, 3cm, \foreach A1 , B1 , C1 , D1 , E1 , F1 , G1 , H1 , \foreach
94
\begin{tikzpicture} \foreach \x in 0,20,...,360{ \lldraw[red] (0,0) .. controls (\x+10 :1) .. (\x :1) .. controls (\x-10 :1) .. (0,0) ;} \foreach \x in 10,30,...,370{ \lldraw[blue] (0,0) .. controls (\x+10 :3) .. (\x :3) .. controls (\x-10 :3) .. (0,0) ;} \end{tikzpicture} Variable \x : angle
17.3
X X X \begin{tikzpicture} \draw (0,0) \foreach \x in {1,2,3} \foreach \y in {0,1,2} { (\x,\y) node{X}} ; \end{tikzpicture}
X X X \begin{tikzpicture} \draw (0,0) \foreach \y in {0,1,2} \foreach \x in {1,2,3} { (\x,\y) node{X}} ; \end{tikzpicture}
95
18
18.1
frre
moi
soeur
ls
lle
\begin{tikzpicture} \node {pre} child {node {frre}} child {node {moi} child {node {ls}} child {node {lle}}} child {node{soeur}} ; \end{tikzpicture} racine
18.2
Orientation
soeur pre moi frre lle pre ls frre \node {pre}[grow=30] soeur moi lle ls pre soeur \node {pre}[grow=30] frre moi ls lle
\node {pre}[grow=-30]
96
lle
ls ls
frre
soeur lle
soeur
moi
frre lle
moi
pre
pre
moi ls
soeur
moi
frre
pre
moi
\node {pre} child[grow=right,red] {node {frre}} child {node {moi} child {node {ls}} child {node {lle}}} child[grow=north west,red] {node{soeur}} ;
moi
ls
lle
18.3
18.3.1
Distance
Distance pre ls pre
frre
moi
soeur
pre
soeur
child[level distance=3cm,red] {node {frre}} child[level distance=.5cm,red] {node {lle}} Par dfaut : level distance=15 mm 97
pre frre ls moi lle soeur frre ls \node {pre}[level 1/.style={level distance=1cm}] 18.3.2 Distance frre soeur pre pre
pre
moi lle
soeur
frre
moi soeur
frre
moi
soeur
ls
lle
ls
lle
\node {pre}[sibling distance=1cm,red] \node {pre}[sibling distance=3cm,red] Par dfaut : sibling distance=15 mm Problme pre solution pre
frre
moi
soeur
frre
moi
soeur
ls
neveu lle
nice
ls
[sibling distance=2cm]
98
18.4
,draw] {pre}[grow=right]
{node[diamond,draw] frre} {node[diamond,draw] moi {node[ellipse,draw] ls} {node[ellipse,draw] lle}} {node[diamond,draw] soeur} ;
\node[rectangle,double,draw,text width=1cm,text centered] {pre}[grow=right,level distance=2cm] child child child child child {node[red,ultra thick,draw,rotate=45] {frre}} {node[blue,dashed, draw] {moi} {node[ellipse,draw] {ls}} {node [ellipse,ll] {lle}}} {node [magenta,pattern=dots,draw] {soeur}} ;
18.4.1
Nom des noeuds a \node (a) {a} child child { child {child child} child {child } }; \node at (a-1) {a-1} ; \node at (a-2) {a-2} ; \node at (a-2-2) {a-2-2} ; \node at (a-2-1) {a-2-1} ; \node at (a-2-1-2) {a-2-1-2} ; \draw[red,ultra thick] (a-1) (a-2) ; \node (a) {a} child child child coordinate (b) child child child ; \node at (a-1) {a-1} ; \node at (a-2) {a-2} ; \node at (b) {b} ; \node at (a-2-2) {a-2-2} ; \node at (b-1) {b-1} ; \node at (a-2-1-2) {a-2-1-2} ; \draw[red,ultra thick] (a-1) (b-1) ;
a-1
a-2
a-2-1
a-2-2
a-2-1-2
a-1
a-2
a-2-2
b-1
a-2-1-2
99
pre
frre
moi
soeur
\node (a) {pre} child {node (b) {frre}} child {node (c) {moi} child {node (d) {ls}} child {node (e) {lle}}} child {node (f) {soeur}} ; \draw[redultra thick] (b) (d) ;
ls 18.4.2
lle
18.4.3
frre
moi
frre
moi
ls
lle
ls
lle
\node {pre} [child anchor=east,red] child {node {frre}} child { node {moi} child {node {ls}} child {node {ls}} } ; pre
\node {pre} child {node {frre}} child { node {moi} child [child anchor=west,red] {node {ls}} child {node {ls}} } ; pre
frre
moi
frre
moi
ls
lle
ls
lle
\node {pre} [parent anchor=east,red] child {node {frre}} child { node {moi} child {node {ls}} child {node {ls}} } ;
\node {pre} child {node {frre}} child { node {moi} child [parent anchor=west,red] {node {ls}} child {node {ls}} } ;
100
18.5
Liaison
pre pre pre
frre
moi
soeur
frre
moi
soeur
frre
moi
soeur
ls
lle
ls
lle
ls
lle
frre
moi
soeur
ls
lle
[edge from parent/.style={draw,red,ultra thick}] \node {pre} 18.5.1 tiquetes sur liaisons
\node {pre} child {node {ls} edge from parent node[left,red] {texte}} ; pre pre pre pre texte ls node[left,red] 18.5.2 texte ls node[right,red] texte ls node[near end,red] texte ls node[draw,red]
[ edge from parent path= {(\tikzparentnode.south) .. controls +(0,-1) and +(0,1) .. (\tikzchildnode.north)} ] pre pre pre
frre
moi
soeur
frre
moi
soeur
frre
moi
soeur
ls
lle
ls -|
lle
ls
lle
to[in=90,out=-90]
101
18.6
18.6.1
Positions dun ls et de deux ls grow via three points={ one child at (0,1) and two children at (-.5,1) and (.5,1)}
un
deux
trois
quatre
grow via three points={ one child at (0,1) and two children at (0,1) and (1,1)}
un
deux
trois
quatre
grow via three points={ one child at (0,1) and two children at (-.5,1) and (.5,1.5)}
un
deux
trois
quatre
18.6.2
Liaison angulaire
racine
\node {racine} [clockwise from=30,sibling angle=30] child child child child {node {node {node {node {$30$} } {$0$} } {$-30$} } {$-60$ } } ; 102
18.6.3
Liaisons en fourchette pre \node {pre} [edge from parent fork down] child child child child }; lle \node {pre} [edge from parent fork right] child child child child }; lle lle moi {node {node {node {node {frre}} {moi} {ls}} {lle}} {node {frre}} {node {moi} [child anchor=north east] {node {ls}} {node {lle}}
frre
moi
ls pre
frre
moi
ls
pre frre
ls
\node {pre} [edge from parent fork right,grow=right] child child child child }; {node {node {node {node {frre}} {moi} {ls}} {lle}}
103
19
Les animations
\usepackage{animate}
19.1
\includegraphics{XXX1}
\includegraphics{XXX2}
: :boutons de contrle :en boucle :auto dmarrage :4 fois par seconde :base du nom chier :numero de dbut :numero de n
19.2
Animateinline
\begin{animateinline}[controls,loop,autoplay]{5} % premire image \begin{tikzpicture} \ll[blue] (45 :2) - - (135 :.5)- - (225 :2)- -(315 :.5) - - cycle ; \ll[blue] (45 :.5) - - (135 :2)- - (225 :.5)- -(315 :2) - - cycle ; \endACtikzpicture % deuxime \newframe \begin{tikzpicture} \ll[blue] (0 :2) - - (90 :.5)- - (180 :2)- -(270 :.5) - - cycle ; \ll[blue] (0 :.5) - - (90 :2)- - (180 :.5)- -(270 :2) - - cycle ; \end{tikzpicture} \end{animateinline}
104
19.3
Multiframe
\begin{animateinline}[poster=rst,controls, palindrome]{12} \multiframe{29}{iAngle=80+10, Rdim=2.0+-0.2}{ \begin{tikzpicture} \ll[blue] (\iAngle+45 :\Rdim) - - (\iAngle+135 :.5)- - (\iAngle+225 :\Rdim)-(\iAngle+315 :.5) - - cycle ; \ll[blue] (\iAngle+45 :.5) - - (\iAngle+135 :\Rdim)- - (\iAngle+225 :.5)-(\iAngle+315 :\Rdim) - - cycle ; \end{tikzpicture} } \end{animateinline}
la variable dnit son type initiale : i ou I initiale : n, N, r ou R initiale : d ou D \begin{animateinline}[autoplay,loop]{12} \multiframe{24}{iAngle=0+15,icol=0+5}{\begin{tikzpicture} \draw[line width=0pt] (-2,-3) rectangle(6,3) ; \draw (0,0) node[ll=white,circle,rotate=\iAngle] {\includegraphics[width=2cm]{LogoIUT}} (0,0) circle (1) ; \draw (0,0) circle (1) ; \coordinate (abc) at (${sqrt(9-sin(\iAngle)*sin(\iAngle))+cos(\iAngle)}*(1,0)$) \coordinate (xyz) at (\iAngle :1) ; \draw[ultra thick] (0,0) - -(xyz) ; \draw[ultra thick] (xyz) - - (abc) ; \ll[color=blue !\icol] (abc)++(0.5,-1) rectangle (5,1) ; \draw[ultra thick] (abc) ++(0,-1) rectangle ++(.5,2) ; \draw[ultra thick] (1.5,1) - - (5,1) - - (5,-1) - - (1.5,-1) ; \ll[red] (xyz) circle (4pt) ; \ll[red] (abc) circle (4pt) ; \end{tikzpicture}} \end{animateinline}
105
20
module de base tikz : insrer dans le prambule \usepackage{tikz} Autres modules nom voir page animate tkz-tab 104 88 documentation1 animate.pdf tkz-tab-screen.pdf A insrer dans le prambule \usetikzlibrary{arrow} \usetikzlibrary{patterns} \usetikzlibrary{calc} \usetikzlibrary{backgrounds} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{decorations.markings} \usetikzlibrary{decorations.footprints} \usetikzlibrary{decorations.shapes} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.fractals} \usetikzlibrary{shapes.geometric} \usetikzlibrary{shapes.symbols} \usetikzlibrary{shapes.arrows} \usetikzlibrary{shapes.callouts} \usetikzlibrary{shapes.misc} \usetikzlibrary{shapes.multipart} \usetikzlibrary{plotmarks}
Complments optionnels : nom voir page arrow 9 patterns 8 calc 14 backgrounds 25 decorations.pathmorphing 45 decorations.pathreplacing 51 decorations.markings 56 decorations.footprints 59 decorations.shapes 60 decorations.text 64 decorations.fractals 66 shapes.geometric 30 shapes.symbols 32 shapes.arrows 34 shapes.callouts 36 shapes.misc 38 shapes.multipart 40 plotmarks 77
106
calendar automata backgrounds chains circuits.ee circuits.logic decorations er external fadings t xedpointarithmetic folding fpu intersections lindenmayersystems matrix mindmap petri plothandlers positioning proler scopes shadings shadows shapes.gates.ee shapes.gates.ee.IEC shapes.gates.logic shapes.gates.logic.IEC shapes.gates.logic.US spy svg.path through topaths trees turtle
dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans dans
une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une une
prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine prochaine
mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise mise
jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour jour
\usetikzlibrary{calendar} \usetikzlibrary{automata} \usetikzlibrary{backgrounds} \usetikzlibrary{chains} \usetikzlibrary{circuits.ee} \usetikzlibrary{circuits.logic} \usetikzlibrary{decorations} \usetikzlibrary{er} \usetikzlibrary{external} \usetikzlibrary{fadings } \usetikzlibrary{t} \usetikzlibrary{xedpointarithmetic} \usetikzlibrary{folding} \usetikzlibrary{fpu} \usetikzlibrary{intersections} \usetikzlibrary{lindenmayersystem} \usetikzlibrary{matrix} \usetikzlibrary{mindmap} \usetikzlibrary{petri} \usetikzlibrary{plothandlers} \usetikzlibrary{positioning } \usetikzlibrary{proler} \usetikzlibrary{scopes} \usetikzlibrary{shadings} \usetikzlibrary{shadows} \usetikzlibrary{shapes.gates.ee } \usetikzlibrary{shapes.gates.ee.IEC } \usetikzlibrary{shapes.gates.logic.IEC} \usetikzlibrary{shapes.gates.logic.IEC} \usetikzlibrary{shapes.gates.logic.US} \usetikzlibrary{spy} \usetikzlibrary{svg.path} \usetikzlibrary{through} \usetikzlibrary{topaths} \usetikzlibrary{trees} \usetikzlibrary{turtle}
Rfrences
[1] pgfmanual.pdf [2] pgfplots.pdf [3] tkz-tab-screen.pdf version 2.10 version 1.80 version 1.1c 726 pages 439 pages 83 pages
107