I am doing this:
\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz,amsmath}
\usetikzlibrary{arrows}%
\usepackage[np,autolanguage]{numprint}
\begin{document}
\begin{tikzpicture}%
\draw[step=1cm,black,thin] (0,0) grid (5,5);
%\foreach \x in {0, 1,...,5} { \node [anchor=north] at (\x,-0.2) {0.0}; }
%\foreach \y in {0, 1,...,5} { \node [anchor=east] at (-0.2,\y) {\y}; }
\node at (-0.5,0) {0.0};
\node at (-0.5,1) {0.2};
\node at (-0.5,2) {0.4};
\node at (-0.5,3) {0.6};
\node at (-0.5,4) {0.8};
\node at (-0.5,5) {1.0};
\node at (0,-0.5) {0.0};
\node at (1,-0.5) {0.2};
\node at (2,-0.5) {0.4};
\node at (3,-0.5) {0.6};
\node at (4,-0.5) {0.8};
\node at (5,-0.5) {1.0};
\draw [fill=black, thin] (0.5,2.5) circle [radius=0.05];
\draw [fill=black, thin] (1.5,0.5) circle [radius=0.05];
\draw [fill=black, thin] (2.5,4.5) circle [radius=0.05];
\draw [fill=black, thin] (3.5,1.5) circle [radius=0.05];
\draw [fill=black, thin] (4.5,3.5) circle [radius=0.05];
\end{tikzpicture}%
\end{document}
Please tell me there is a better way to number the grids (not numbering individual node) and drawing multiple circles in one go!
Thank you.
Best Answer
Do you want simple foreachs for everything? The same as in your code can be done with
If you want something more clever, you have to explain the technique you want to show here.
Nodes can be placed as
below
andleft
as well. No hard coding needed.If you are going to plot more data, you should go for
pgfplots
of course: