\begin{tikzpicture}
\begin{axis}[
axis x line = center,
axis y line = center,
xmin = -3.0,
xmax = 5.0,
ymin = -3.0,
ymax = 5.0]
\addplot[
domain = 0.1:5.0,
] {1/x};
\end{axis}
\foreach \Point/\PointLabel in {(4,4)/x_0, (3,1)/B, (1,4)/P_1, (3,4)/P_1}
\draw[fill=black] \Point circle (0.05) node[above right] {$\PointLabel$};
\end{tikzpicture}
The code above will generate the following graph:
I was trying to add the text x0 around the point (1,1) in the axis environment. But it seems that the coordinate system between the axis environment and the tikzpicture is different.
Could you help me with explaining the environment misalignment problem?
And how to put the x0 label at the (1,1) coordinate under the axis environment in an elegant way?



\coordinate (A) at (axis cs: 4,4};to define a global coordinate, then use\draw (A) etcoutside the axis environment. – John Kormylo May 24 '21 at 23:02axis cs:explicitly - it has been default since long time ago. – hpekristiansen Jan 22 '23 at 10:20axisthen there is chapter 4.26 in the manual or see e.g. https://tex.stackexchange.com/a/667195/8650 – hpekristiansen Jan 22 '23 at 10:31compatlevel does not change. I can only say that you should not write it - it is a bad habit that is perpetuated by old posts on this site. – hpekristiansen Jan 22 '23 at 17:26