# Plotting points around two circles using tikz

I am looking to place points around two circles like this:

Using tikz I can draw for example the two circles but how can I either i)plot small circles like \fill (x,y) circle[radius=3pt]; on the given circles or ii)around the circle. I can't find each point satisfying the equation for a large number of points as this would be very time consuming. Thanks

• Welcome! Please provide code showing what you've got/tried, preferably in the form of a minimal example which we can copy-paste-compile. If you are representing data, aren't you using the data to determine the plot?
– cfr
Jun 25, 2017 at 21:41
• Hello and thank you for you comment. I'm trying to make an example, no given data needed.
– John
Jun 25, 2017 at 21:44

Quick and dirty with pgfplots, plotting cos(x)+random number against sin(x)+random number.

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
cycle list={
only marks,mark=*,fill=red,draw=black,mark size=1pt\\
only marks,mark=*,fill=cyan,draw=black,mark size=1pt\\
},
domain=0:360,
samples=500,
title={N=500,\dots},
grid,
axis equal
]


• Nice - a small detail; if the points are to be spread concentric around the circle, you need to multiply the random factor - not add it. Something like: {(0.9+0.2*rnd)*cos(x)},{(0.9+0.2*rnd)*sin(x)} (not tested). Jun 26, 2017 at 3:12
• @hpekristiansen Thanks. It doesn't appear to make much of a difference in this case (see imgur.com/a/9wlVM -- left is addition, right multiplication). I should have used rand though (numbers between -1 and 1), and not rnd (between 0 and 1). Jun 26, 2017 at 7:00