题库
试卷
组卷
图库
知识
坐标轴
核心代码解释:
本代码段演示如何画一个二维坐标轴。
xoy坐标轴的三个坐标点分别为 (0,2) , (0,0) ,(2,0)
[ <->] 标识使用箭头连接坐标点。
在代码里,\node定义了坐标旁的文字。 代码段
\node [left] at (0,2) {$y$};
表示在坐标为 (0,2) 的旁边标注文本y
下面代码段表示把原点o画在下面,并更改其文字为“O”
\node [below] at (0,0) {$O$};
\documentclass[tikz,border=10pt]{standalone} \begin{document} \begin{tikzpicture} \draw [ <->] (0,2) -- (0,0) -- (2,0); \node [below right] at (2,0) {$x$}; \node [left] at (0,2) {$y$}; \node [left] at (0,0) {$o$}; \end{tikzpicture} \end{document}