LaTeX - x,y坐标轴标签

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[help lines,black] (0,0) grid (9,9); %网格线
\draw [->] (0,0)--(9.5,0) node[below right] { $X$};
\draw [->] (0,0)--(0,9.5) node[above left] {$Y$};
\node[below left] at (0,0) {0};
\foreach \i in {1,...,9}
\draw (\i,-0.05)--++(90:0.1) node[below=1mm]{\i};
%\draw (\i,-0.05)--(\i,0.05) node[below=1mm]{\i};
\foreach \i in {1,...,9}
\draw (0.05,\i)--++(180:0.1) node[left=-0.5mm]{\i};
%\draw (-0.05,\i)--(0.05,\i) node[left=1mm]{\i};
\end{tikzpicture}    
\end{document}

LaTeX - x,y坐标轴标签_第1张图片

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[-stealth] (-4,0) -- (4,0) node[right] {$x$} ; 
\draw[-stealth] (0,-4) -- (0,4) node[right] {$y$}; 
\foreach \x/\xtext in {-3/-3,-2/-2, -1/-1, 1/1, 2/2,3/3}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {\small $\xtext$};
\foreach \y/\ytext in {-3/-3,-2/-2, -1/-1, 1/1, 2/2,3/3}
\draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {$\ytext$};
\end{tikzpicture}
\end{document}

LaTeX - x,y坐标轴标签_第2张图片

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\tikzset{3dplot/.style={x={(0.353cm,0.353cm)},y={(1cm,0cm)},z={(0cm,1cm)}}}
\begin{tikzpicture}[3dplot]
\draw[->] (0,0,0) -- (-3,0,0) node[right] {$x$};
\draw[->] (0,0,0) -- (0,3,0) node[below] {$y$};
\draw[->] (0,0,0) -- (0,0,3) node[above] {$z$};
\end{tikzpicture}
\end{document}

LaTeX - x,y坐标轴标签_第3张图片

转载于:https://my.oschina.net/shaodongtang/blog/2252839

你可能感兴趣的:(LaTeX - x,y坐标轴标签)