TransWikia.com

How to remove the tick number in tikzpicture code?

TeX - LaTeX Asked on January 7, 2021

I created the code of tikzpicture in Geogebra. I want to remove the tick number leaving only the ticks. How to modify the code and remove the tick number. The code of the tick picture is:

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}

One Answer

If I understand correctly, you need to add this

xticklabels=empty,
yticklabels=empty,

after the last comma in ytick={-0.0,1.0,...,4.0}, and before the ]in line 10

Correct answer by Luis Sibaja on January 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP