我在 Geogebra 中创建了 tikzpicture 的代码。我想删除刻度数,只留下刻度。如何修改代码并删除刻度数。刻度图片的代码是:
\begin{tikzpicture}
\begin{axis}[
x=1.0cm,y=1.0cm,
axis lines=middle,
xmin=-0.9,
xmax=4.3,
ymin=-0.8,
ymax=4.8,
xtick={-0.0,1.0,...,4.0},
ytick={-0.0,1.0,...,4.0},]
\draw [->,line width=1.pt] (-0.94,0.58) -- (3.66,4.32);
\draw [line width=1.pt] (1.032939261855717,2.1840853998566048)-- (1.,0.);
\draw [line width=1.pt] (3.042000477984272,3.817539519056778)-- (3.,0.);
\draw [line width=1.pt] (1.032939261855717,2.1840853998566048)-- (3.0244214305585078,2.219731316008284);
\draw (0.5839577167019019,2.863133192389007) node[anchor=north west] {$\text P$};
\draw (2.461336152219873,4.486811839323468) node[anchor=north west] {$\text Q$};
\draw (0.7361775898520077,-0.01213107822410112) node[anchor=north west] {$x_1$};
\draw (2.8672558139534883,-0.07978435517970366) node[anchor=north west] {$x_2$};
\draw (0.6516109936575044,1.4762410147991547) node[anchor=north west] {$y_1$};
\draw (3.104042283298097,1.696114164904863) node[anchor=north west] {$y_2$};
\draw (3.1378689217758984,3.455099365750529) node[anchor=north west] {$y_2-y_1$};
\draw (1.514190274841437,2.3219069767441867) node[anchor=north west] {$x_2-x_1$};
\draw (4.304887949260042,0.3430486257928122) node[anchor=north west] {$x$};
\draw (-0.14331501057082555,5.298651162790699) node[anchor=north west] {$y$};
\begin{scriptsize}
\draw [fill=black] (1.032939261855717,2.1840853998566048) circle (2.5pt);
\draw [fill=black] (1.,0.) circle (2.5pt);
\draw [fill=black] (3.042000477984272,3.817539519056778) circle (2.5pt);
\draw [fill=black] (3.,0.) circle (2.5pt);
\draw [fill=black] (3.0244214305585078,2.219731316008284) circle (2.5pt);
\end{scriptsize}
\end{axis}
\end{tikzpicture}
答案1
如果我理解正确的话,你需要添加这个
xticklabels=\empty,
yticklabels=\empty,
在第 10 行的最后一个逗号之后ytick={-0.0,1.0,...,4.0},
和之前]