I am currently trying to make a bubble chart in Matplotlib where the bubbles do not overlap, so packing the circles/bubbles in the chart, approximately like
What I thought might work:
- Plot the first data-point using x = 1, y = 1
- Randomly plotting the other data-points by calculating the radius of the bubble given the scalar value as to avoid overlapping
The following would be a brute-force approach.

You can first place all circles on a grid, with a gridspacing as large as twice the maximum radius of any of the circles.
Then you let the circles do a random walk and check in each step if the "potential energy" of the bunch of cicles has become smaller and if the positions obtained are valid (i.e. no overlaps).
As a "potential" we can simply use a square radial function.
The code:
Because of the random walk nature of this, finding the solution will take a little time (~10 seconds in this case); you may of course play with the parameters (mainly the number of steps
1000*self.N
until a solution is fixed) and see what suits your needs.