this is my first post so please correct me if I am doing something wrong. I wish to draw a tikzpicture with nodes and use here absolute coordinates. I don't know why, but somehow my coordinates seem to be relative and not absolute. In this code sample, for instance, one node should be positioned at (0,0) but instead is somewhere in the negative area of the coordinate system. What am I doing wrong?
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\tikzset{>=latex}
\begin{document}
\begin{tikzpicture}[scale=0.8]
\pgfplotsset{
width =0.9\textwidth,
height = 0.9\textwidth,
legend cell align=left,
legend pos=outer north east,
legend style={draw=none, anchor=north west, at={(1.1,1)},font=\Large,
xmin=-124, xmax=160,
},
every tick label/.append style={font=\Large},
yticklabel style={text width=3em,align=right},
}
\begin{axis}[grid=major, ymin=-50, ymax=150]
\node(0) at (0,0)[rectangle,draw, minimum size = 5pt, fill = black,
inner sep = 0pt]{};
\node(1) at (-5, 70)[minimum size = 3.7pt, fill= white, inner sep = 0pt,
shape = circle, draw]{};
\node(2) at (-17, 69)[minimum size = 3.7pt, fill= white, inner sep = 0pt, shape = circle, draw]{};
\node(3) at (-19, 85)[minimum size = 3.7pt, fill= white, inner sep = 0pt, shape = circle, draw]{};
\node(4) at (9, 99)[minimum size = 3.7pt, fill= white, inner sep = 0pt, shape = circle, draw]{};
\node(5) at (15, 82)[minimum size = 3.7pt, fill= white, inner sep = 0pt, shape = circle, draw]{};
\end{axis}
\end{tikzpicture}
\end{document}
at (axis cs: 0,0)
etc – Thruston May 3 '16 at 10:09\pgfplotsset{compat=1.13}
to the preamble, in which caseaxis cs
is default. (This applies to compat settings of 1.11 and higher.) So I'm assuming you need to refer to the nodes at some later point? Because if you don't need that, it's much easier to draw the circles with\addplot
. – Torbjørn T. May 3 '16 at 10:15