Debian Codegraph @

texmf-dist/doc/latex/tkz-base/TKZdoc-base-divers.tex

raw
1 \section{Lines parallel to the axes}
2
3 \subsection{ Draw a horizontal line with \tkzcname{tkzHLine}}
4 \tkzHandBomb The syntax is that of \tkzname{xfp}!
5 \begin{NewMacroBox}{tkzHLine}{\oarg{local options}\marg{decimal number}}%
6 \begin{tabular}{lll}%
7 arguments & example & definition \\
8 \midrule
9 \TAline{decimal number}{\tkzcname{tkzHLine\{1\}}}{Draw the straight line $y=1$}
10 \bottomrule
11 \end{tabular}
12
13 \medskip
14 \begin{tabular}{lll}%
15 options & default & definition \\
16 \midrule
17 \TOline{color }{|black| }{ line colour}
18 \TOline{line width}{|0.6pt| }{ point thickness}
19 \TOline{style }{|solid|}{ line style }
20 \bottomrule
21 \end{tabular}
22
23 {see the lines options in \TIKZ}
24 \end{NewMacroBox}
25
26 \subsubsection{Horizontal line }
27
28 \begin{tkzexample}[latex=7cm,small]
29 \begin{tikzpicture}[scale=2]
30 \tkzInit[xmax=3,ymax=1.5]
31 \tkzAxeXY
32 \tkzHLine[color = blue,
33 style = dashed,
34 line width = 2pt]{1}
35 \end{tikzpicture}
36 \end{tkzexample}
37
38
39
40 \subsubsection{Horizontal line and value calculated by \tkzname{xfp} }
41 \begin{tkzexample}[latex=7cm,small]
42 \begin{tikzpicture}
43 \tkzInit[xmin=-3,xmax=3,ymin=-2,ymax=1.5]
44 \foreach\v in {-1,1}
45 {\tkzHLine[color=red]{\v*pi/2}}
46 \tkzDrawX
47 \tkzAxeY[trig=2]
48 \tkzLabelY
49 \end{tikzpicture}
50 \end{tkzexample}
51
52 \subsection{Horizontal lines with \tkzcname{tkzHLines} }
53 \hypertarget{thls}{}
54 \tkzHandBomb The syntax is that of \tkzname{xfp}!
55 \begin{NewMacroBox}{tkzHLines}{\oarg{local options}\marg{list of values}}%
56 \begin{tabular}{lll}%
57 arguments & example & definition \\
58 \midrule
59 \TAline{list of values}{\tkzcname{tkzHLines\{1,4\}}}{draws the lines $y=1$ and $y=4$}
60 \end{tabular}
61 \end{NewMacroBox}
62
63 \subsubsection{Horizontal lines}
64
65
66 \begin{tkzexample}[latex=7cm,small]
67 \begin{tikzpicture}
68 \tkzInit[xmax=5,ymax=4]
69 \tkzAxeXY
70 \tkzHLines[color = magenta]{1,...,3}
71 \end{tikzpicture}
72 \end{tkzexample}
73
74
75 \subsection{ Draw a vertical line with \tkzcname{tkzVLine}}
76 \tkzHandBomb The syntax is that of \tkzname{xfp}!
77 \begin{NewMacroBox}{tkzVLine}{\oarg{local options}\marg{decimal number}}%
78 \begin{tabular}{lll}%
79 arguments & example & definition \\
80
81 \midrule
82 \TAline{decimal number}{\tkzcname{tkzVLine\{1\}}}{Draw the line $x=1$}
83 \bottomrule
84 \end{tabular}
85
86 \medskip
87 \begin{tabular}{lll}%
88 \toprule
89 options & default & definition \\
90 \midrule
91 \TOline{color }{|black| }{line colour}
92 \TOline{line width}{|0.6pt| }{point thickness}
93 \TOline{style }{|solid|}{line style }
94 \bottomrule
95 \end{tabular}
96
97 See options the lines in \TIKZ.
98 \end{NewMacroBox}
99
100
101 \subsubsection{Vertical line }
102
103 \begin{tkzexample}[latex=8cm,small]
104 \begin{tikzpicture}[scale=2]
105 \tkzInit[xmax=3,ymax=1]
106 \tkzAxeXY
107 \tkzVLine[color = blue,
108 style = dashed,
109 line width = 2pt]{1/3}
110 \end{tikzpicture}
111 \end{tkzexample}
112
113 \subsubsection{Vertical line and value calculated by \tkzname{xfp} }
114 \begin{tkzexample}[latex=8cm,small]
115 \begin{tikzpicture}
116 \tkzInit[xmax=7,ymin=-1,ymax=1]
117 \foreach\v in {1,2}
118 {\tkzVLine[color=red]{\v*pi}}
119 \tkzDrawY
120 \tkzAxeX[trig=2]
121 \tkzLabelY
122 \end{tikzpicture}
123 \end{tkzexample}
124
125
126 \subsection{Vertical lines with \tkzcname{tkzVLines} }
127 \hypertarget{tvls}{}
128 \tkzHandBomb The syntax is that of \tkzname{xfp}!
129 \begin{NewMacroBox}{tkzVLines}{\oarg{local options}\marg{list of values}}%
130 \begin{tabular}{lll}%
131 arguments & example & definition \\
132 \midrule
133 \TAline{list of values}{\tkzcname{tkzVLines\{1,4\}}}{Trace the lines $x=$1 and $x=4$}
134 \end{tabular}
135 \end{NewMacroBox}
136
137 \subsubsection{Vertical lines}
138
139 \begin{tkzexample}[latex=7cm,small]
140 \begin{tikzpicture}
141 \tkzInit[xmax=5,ymax=2]
142 \tkzAxeXY
143 \tkzVLines[color = green]{1,2,...,4}
144 \end{tikzpicture}
145 \end{tkzexample}
146
147 \section{Ticks on the axes}
148 %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
149 \subsection{ Drawing one tick on the abscissa axis \tkzcname{tkzHTick}}
150 \begin{NewMacroBox}{tkzHTick}{\oarg{local options}\marg{decimal number}}%
151 \begin{tabular}{lll}%
152 arguments & example & definition \\
153 \midrule
154 \TAline{decimal number}{\tkzcname{tkzHTick\{1\}}}{the abscissa of the tick is 1}
155 \bottomrule
156 \end{tabular}
157
158 \medskip
159 \begin{tabular}{lll}%
160 options & default & definition \\
161 \midrule
162 \TOline{mark }{* }{full disk}
163 \TOline{mark size}{3 pt }{symbol size}
164 \TOline{mark options}{empty}{allows you to use color for example}
165 \bottomrule
166 \end{tabular}
167
168 See options for \TIKZ.
169 \end{NewMacroBox}
170
171 \subsubsection{Example}
172
173 \begin{tkzexample}[latex=7cm,small]
174 \begin{tikzpicture}
175 \tkzInit[xmax=6]
176 \tkzDrawX
177 \tkzHTick[mark=ball,mark size=3pt]{pi/2}
178 \tkzHTick[mark=*,
179 mark options={color=purple}]{2*exp(1)}
180 \end{tikzpicture}
181 \end{tkzexample}
182
183 \subsection{ Drawing ticks on the abscissa axis \tkzcname{tkzHTicks}}
184 \begin{NewMacroBox}{tkzHTicks}{\oarg{local options}\marg{list of numbers}}%
185 \begin{tabular}{lll}
186 arguments & example & definition \\
187 \midrule
188 \TAline{decimal number}{\tkzcname{tkzHTicks\{1\}}}{the abscissa of the tick is 1}
189 \bottomrule
190 \end{tabular}
191
192 See options for \TIKZ.
193 \end{NewMacroBox}
194
195 \subsection{ Drawing one tick on the ordinate axis \tkzcname{tkzVTick}}
196 \begin{NewMacroBox}{tkzVTick}{\oarg{local options}\marg{decimal number}}%
197 \begin{tabular}{lll}%
198 arguments & example & definition \\
199 \midrule
200 \TAline{decimal number}{\tkzcname{tkzVTick\{1\}}}{the ordinate of the tick is 1}
201 \bottomrule
202 \end{tabular}
203
204 See options for \TIKZ.
205 \end{NewMacroBox}
206
207 \subsection{ Drawing ticks on the ordinate axis \tkzcname{tkzVTicks}}
208 \begin{NewMacroBox}{tkzVTicks}{\oarg{local options}\marg{decimal number}}%
209 \begin{tabular}{lll}
210 arguments & example & definition \\
211 \midrule
212 \TAline{decimal number}{\tkzcname{tkzVTicks\{1,3\}}}{the ordinates of the ticks are 1 and 3}
213 \bottomrule
214 \end{tabular}
215
216 See options for \TIKZ.
217 \end{NewMacroBox}
218
219 \endinput