我想绘制一些函数并标记我想要的点,例如每个 1 或每个 0.1 和水平轴。
\documentclass[a4paper]{article}
\usepackage{tikz,tkz-base, pgf, tkz-euclide}
\usepackage{pgfplots}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}%
[
anchor=center, %%% noodzakelijk om te punten correct te kunnen bepalen.
major grid style=black,
grid=both,
title= $x(t)$-diagram,
x=100mm,
y=100mm,
xtick={0,0.1,...,0.8},
%minor xtick={0,0.2,...,14},
xmin=0, xmax=0.8,
xlabel={\scriptsize $t$(s)},
ylabel={\scriptsize $x$(m)},
axis x line=middle,
ytick={0,0.1,...,0.5},
minor ytick={0,0.01,...,0.5},
tick label style={font=\tiny},
ymin=0, ymax=0.45,
axis y line=middle,
]
\addplot[smooth, mark=*,cyan] {1*x};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
正如您在图片上看到的,它不行。我真的有必要再做一个\addplot
吗?