summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-grid.tex
blob: 6dadd23134d4a64882a399e062fed86571061746 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
\section{Utilisation de \tkzcname{tkzGrid}} \hypertarget{grid}{}   

\begin{NewMacroBox}{tkzGrid}{\oarg{local options}\parg{$x_A~;~y_A$} \parg{$x_B~;~y_B$}}
  Quelques changements pour cette macro. Tout d'abord, pour simplifier actuellement la couleur de la grille la plus fine est déterminée automatiquement à partir de la grille principale, même processus pour l'épaisseur.  Ce comportement pourra  être modifié  à l'aide de styles. 

\begin{tabular}{lll}
options   & défaut      & définition                                        \\
\midrule  
\TAline{\parg{$x_A~;~y_A$} \parg{$x_B~;~y_B$}}{(xmin,ymin)(xmax,ymax)} {trace une grille} 
\end{tabular}  

  
\begin{tabular}{lll}
options   & défaut      & définition                                        \\
\midrule  
\TOline{sub}{true} {demande une sous grille }
\TOline{color}{darkgray}{couleur de la  grille principale}
\TOline{subxstep}{0.2} {le pas des sous-graduations pour l'axe des abscisses}  
\TOline{subystep}{0.2}{le pas des sous-graduations pour l'axe des ordonnées } 
\TOline{line width}{0.4pt} {épaisseur des traits de la grille principale} 
\bottomrule  
\end{tabular}

\medskip
{Les valeurs par défaut peuvent être changées dans le fichier de configuration ou encore par des macros. La couleur de la seconde grille est celle de la grille principale, mais moins intense. Même comportement pour l'épaisseur du trait. Voir les exemples pour modifier ce comportement.}
\end{NewMacroBox}  

\subsubsection{\tkzcname{tkzGrid} et l'option \tkzname{sub}}
L'option \tkzname{sub} permet d'afficher une grille secondaire plus fine.
Il est préférable de lancer \tkzcname{tkzGrid} en premier,
 pour éviter que la grille se superpose à d'autres éléments .
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}
 \tkzInit[xmax=4, ymax=2]
 \tkzGrid[sub] 
 \tkzAxeXY    
\end{tikzpicture}
\end{tkzexample}  

\subsubsection{Option \tkzname{sub}}
L'option \tkzname{sub} permet d'afficher un grille secondaire plus fine. Certains paramètres sont mofiables.

 
\begin{tkzexample}[latex=6cm,small] 
\def\tkzCoeffSubColor{20}
\def\tkzCoeffSubLw{0.2} 
\begin{tikzpicture}
 \tkzInit[xmax=4, ymax=2]
 % on peut modifier le pas pour la seconde grille 
 \tkzGrid[sub,color=orange,
         subxstep=.5,subystep=.5] 
  \tkzAxeXY 
\end{tikzpicture}
\end{tkzexample}    

\subsubsection{Presque par défaut}
\begin{tkzexample}[width=7cm,small]
\begin{tikzpicture}
  \tkzInit[xmax=5,ymax=2]
  \tkzGrid[color=orange]
  \tkzAxeXY  
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Sous grille en plus, option \tkzname{sub}}
\begin{tkzexample}[width=7cm,small]
 \begin{tikzpicture}
  \tkzInit[xmax=5,ymax=2]
  \tkzGrid[sub,color=orange]
  \tkzGrid[color=orange]
  \tkzAxeXY  
 \end{tikzpicture}
\end{tkzexample}

\subsubsection{Changement de maille}
\begin{tkzexample}[width=7cm,small]
\begin{tikzpicture}
  \tkzInit[xmax=5,ymax=2]
  \tkzGrid[color    = orange,
           sub,
           subxstep = 0.1,
           subystep = 0.1] 
   \tkzAxeXY 
\end{tikzpicture}
\end{tkzexample}
 
\subsubsection{Option \tkzname{xstep}, \tkzname{xstep}, \tkzname{subxstep} et \tkzname{subystep}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
\tkzInit[xmax=.5,xstep=.1,
         ymax=.2,ystep=.1]
\tkzGrid[sub,
         subxstep = 0.05,
         subystep = 0.05,
         color=orange]
\tkzAxeXY 
\end{tikzpicture} 
\end{tkzexample}

\subsubsection{Avec des intervalles importants}

\begin{tkzexample}[width=7cm,small]
\begin{tikzpicture}
   \tkzInit[xmax=100,xstep=20,
            ymax=3000,ystep=1000]
   \tkzGrid[sub,subxstep=10,
                subystep=500,
                color=orange]
   \tkzAxeXY 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzGrid} et les arguments}  

La grille peut avoir une taille quelconque.
\begin{tkzexample}[width=8cm,small]
\begin{tikzpicture}
   \tkzInit[xmax=100,xstep=20,
            ymax=3000,ystep=1000]
   \tkzGrid[sub,subxstep=10,
            subystep=500,
            color=orange]
            (-20,-1000)(115,4000)%
  \tkzAxeXY 
\end{tikzpicture}
\end{tkzexample} 

\subsubsection{Usage de \tkzname{pi} avec \tkzcname{tkzGrid}} 
\begin{tkzexample}[width=8cm,small]   
\begin{tikzpicture}[scale=.75] 
   \tkzInit[xmax=6.5,ymax=6.5]
   \tkzGrid[xstep=pi,ystep=pi/2,sub,
            subxstep=pi/4,subystep=pi/4]
   \tkzLabelX[label=$t$,orig=false,trig=4,
            below=6pt,font=\scriptsize]
   \tkzLabelY[trig=2,font=\scriptsize]
   \tkzDrawXY  
\end{tikzpicture}  
\end{tkzexample}  

\subsubsection{Options \tkzname{frac} et \tkzname{trig} avec \tkzcname{tkzGrid}}
\begin{tkzexample}[width=8cm,small]   
\begin{tikzpicture} 
   \tkzInit[xmax=9,xstep=3,ymax=4]
   \tkzGrid[xstep=1,ystep=pi/2,sub,
            subxstep=1,subystep=pi/4]
   \tkzLabelX[label=$t$,orig=false,frac=3,
            below=6pt,font=\scriptsize]
   \tkzLabelY[trig=2,font=\scriptsize]
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Utilisation d'une grille de répérage}
\begin{tkzexample}[latex=8cm,small] 
\begin{tikzpicture}[scale=.5]
  \tikzset{xaxe style/.style ={-}} 
  \tkzInit[xmax=15,ymax=15]
  \tkzClip 
  \tkzGrid[sub,color=orange] 
  \tkzLabelX[label= ]   \tkzLabelY[label= ]
  \tkzDrawXY   
  \node[opacity=.5] at (8,6){%
    \includegraphics[scale=.5]{tiger}};
\end{tikzpicture}
\end{tkzexample}

                
\endinput