# Labeling points on a plane

I have two points in a plane, both depending on several parameters. The coordinates of them shall fall within the range [0,1], i.e. within the red square:

I would like to draw these points for many values of the parameters, labelling them according to these values in order to show which of them fall within the red square and which not.

Here my code for the background and the red square.

\begin{tikzpicture}
\begin{axis}[xmin=-2,xmax=2,ymin=-2,ymax=2, samples=1000, xlabel={$c$},
ylabel={$s$},unbounded coords=discard]
\draw[red,thick,dashed] (0,0) -- (1,0) -- (1,1) -- (0,1) -- (0,0);
\end{axis}
\end{tikzpicture}


There undoubtedly are more elegant ways

\documentclass{article}

\usepackage{pgfplots}
\usepackage{filecontents}

\begin{filecontents}{try.csv}
0.5  0.5
0.25 0.75
1.5 -1
-1 -1
\end{filecontents}

\begin{document}
\begin{tikzpicture}

\begin{axis}[xmin=-2,xmax=2,ymin=-2,ymax=2]
\draw[red,thick,dashed] (axis cs:0,0) rectangle (axis cs:1,1);
\begin{scope}
\end{scope}
\begin{scope}
\clip (axis cs:0,0) rectangle (axis cs:1,1);

• @Mark I guess you should provide the data, i.e. the colors, first, then one can add the labels with nodes near coords. – user121799 Mar 17 at 18:42