I have a set of points to be shown on a 2-dimensional plot and have written a part of code for.
First, How can I label the points (from 1 to 20 for example) within a loop and represent them by bullet.
Second, any of these points has a magnitude and the size of its bullet should be proportional to the magnitude. Imagine that these points are some location coordinates and the magnitude value represents the severity of a disaster happened there. How can I figure it out?
I appreciate any help in advance
\begin{figure}[H]
\centering
\newcounter{ga}
\setcounter{ga}{1}
\begin{tikzpicture}[x=2cm,y=2cm]
\draw[latex-latex, thin, draw=gray] (0,0)--(10,0) node [right] {$x$};
\draw[latex-latex, thin, draw=gray] (0,0)--(0,10) node [above] {$y$};
\foreach \Point in {
(1,2),
(2,1),
(3,4),
(2.4,3.2),
(3.1,4,1),
(5,6),
(7,9)}
{
\node at \Point {\textbullet};
}
\end{tikzpicture}
\end{figure}
\node[fill, circle, inner sep=2pt] at \Point {};
pgfplots
, look atnodes near coords
, try for example addingnodes near coords*={\coordindex}
to the\addplot
options.