我有一张这样的图表:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (0.,0.) -- (10.,0.);
\foreach \x in {3} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt)
node[below] {\footnotesize $\x$};
\draw[->,color=black] (0.,0.) -- (0.,2.);
\end{tikzpicture}
\end{document}
对于 x 轴,我在 处画了一个点$x=3$
。我想将此点重新标记为 A,而不是 3。我该如何在此代码中执行此操作?
谢谢
答案1
你的意思是这样的:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (0.,0.) -- (10.,0.);
\foreach \x in {3} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize A};
\draw[->,color=black] (0.,0.) -- (0.,2.);
\end{tikzpicture}
\end{document}