LaTeX - x,y坐标轴标签

\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}

\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}

\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}

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

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值