I'm writing a code to create a diagram of crater density. Essentially, every new crater is plotted as a circle, and circles are allowed to overlay each other (because new craters can erase old ones). I was wondering if there's any way to remove circles that have been overlain, or to create a counter to only count how many uninterrupted circles there are? My objective is to count how many 'fresh' craters (circles) there are that haven't been erased by other ones. The first code is my code for creating and plotting these circles (the xx+1, yy+1 is to add a 'shadow' effect).
fig, ax = pl.subplots()
#this is going to create a random list to pull center coordinates from
xcenter = np.random.randint(501, size = 500)
ycenter = np.random.randint(501, size = 500)
#start a counter at 0 so we can see the progression of time
time = 0
#now to zip the x and y center coordinates and make circles
for xx, yy in zip(xcenter, ycenter):
cratershadow = Circle((xx, yy),5, color = 'b')
ax.add_patch(cratershadow)
crater = Circle((xx+1, yy+1), 5, color = 'c')
ax.add_patch(crater)
time += 1
#setting the axiis(?) to be up to 500 km
ax.set_xlim((0,500))
ax.set_ylim((0,500))
pl.xlabel("X side, 500 km Field")
pl.ylabel("Y side, 500 km Field")
pl.title("Crater Density Plot - 500,000 years")
pl.show()