嘿伙计们,提前感谢你们阅读我的文章。
我制作了一个图形来说明$|z|$。
\documentclass[12pt, a4paper]{book}
\usepackage{tkz-fct}
\usepackage{tikz}
\usepackage{tkz-fct}
\begin{center}
\begin{tikzpicture}
\tkzInit[xmin=-.5, xmax=4, ymin=-.5, ymax=3]
\tkzDrawXY[noticks,label={}]
\tkzDefPoint(3,2){z}
\tkzDefPoint(3,0){x}
\tkzDefPoint(0,2){y}
\tkzDefPoint(1.5,1){a}
\tkzDrawPoint[fill=black,size=12](z)
\tkzDrawPoint[fill=black,size=12](x)
\tkzDrawPoint[fill=black,size=12](y)
\tkzLabelPoints[right](z)
\tkzLabelPoints[below](x)
\tkzLabelPoints[left](y)
\tkzLabelPoints[left](a)
\draw (z) -- (0,0);
\draw [dashed] (z) -- (x);
\draw [dashed] (z) -- (y);
\end{tikzpicture}
\end{center}
\end{document}
但\tkzDefPoint(1.5,1){a}
我想替换,$|z|$
但如果我这样做,我会收到失控参数的错误消息。有什么建议吗?
答案1
我很确定你可以用 pure 来做到这一点tkz-euclide
,但总是有可能使用 Ti钾Z 是高效的。
\documentclass[12pt, a4paper]{book}
\usepackage{tkz-fct}
\begin{document}
\begin{center}
\begin{tikzpicture}[bullet/.style={inner sep=3pt,fill,circle}]
\tkzInit[xmin=-.5, xmax=4, ymin=-.5, ymax=3]
\tkzDrawXY[noticks,label={}]
\draw (0,0) coordinate (O)
(3,2) coordinate[bullet,label=above right:$z$] (z)
(z|-O) coordinate[bullet,label=below:$x$] (x)
edge[dashed] (z)
(z-|O) coordinate[bullet,label=left:$y$] (y)
edge[dashed] (z)
(O) -- node[sloped,above]{$|z|$} (z);
\end{tikzpicture}
\end{center}
\end{document}
答案2
\documentclass[12pt, a4paper]{book}
\usepackage{tkz-euclide}
\begin{document}
\begin{center}
\begin{tikzpicture}[bullet/.style={inner sep=3pt,fill,circle}]
\tkzInit[xmin=-.5, xmax=4, ymin=-.5, ymax=3]
\tkzDrawXY[noticks,label={}]
\tkzDefPoints{3/0/x,0/2/y,3/2/z,1.5/1/a,0/0/o}
\tkzDefPoint(3,0){x}
\tkzDrawPoints[fill=black,size=8](x,y,z)
\tkzLabelPoints[right=6pt](z)
\tkzLabelPoints[below=6pt](x)
\tkzLabelPoints[left=6pt](y)
\tkzDrawSegments[dashed](x,z y,z)
\tkzDrawSegments(o,z)
\tkzLabelSegment[above,sloped](o,z){$|z|$}
\end{tikzpicture}
\end{center}
\end{document}
答案3
PSTricks 的一个简单用法。
\documentclass[pstricks,border=0.4102020cm,12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\pspicture[arrowscale=2,arrowinset=0](-1,-1)(7,6)
\pnode(0,0){O}
\pstGeonode[dotscale=2,LabelSep=5mm,PosAngle={-90,45,180}](5,0){x}(5,4){z}(0,4){y}
\pcline[nodesepA=-0.5,nodesepB=-2]{->}(O)(x)
\pcline[nodesepA=-0.5,nodesepB=-2]{->}(O)(y)
\pcline(O)(z)\naput[nrot=:U]{$|z|$}
\psline[linestyle=dashed](x)(z)(y)
\endpspicture
\end{document}