Overlapping circles

I have plotted some circles corresponding to cities on a map, where the circles are proportional to the population of the city.
Naturally this has led to some circles overlapping. When you pan around, in some orientations the the outlines of all circles appear… however in others only the bigger circle is shown.

Is there a way I can ensure that all circles are visible no matter what orientation?

The big circle is sometimes being drawn on after of the smaller ones. I don't think there is a generally reliable way to solve this issue for full-alpha circles with only one circle render. For instance, it's possible to overlap three circles such that no ordering will show the border of every circle totally. I can suggest two options:

If the circles all have exactly the same color (as yours appear to do), then you can add two circle renderers, one for the filled area, and a second (with fill_color=None) for the circle outlines. This takes advantage of the fact that renderers are executed in the order they are added to a plot, so the circle outlines will be rendered after ("on to" of) all the filled area circles.

Otherwise, the only other solution I know of is to apply some fill_alpha to the circle renderer, so that circles below other circles still show through. This is a fairly common approach to dealing with over-plotting such as you have.

Thanks,

Bryan

···

On Nov 14, 2015, at 7:14 AM, Amir El-hamdy <[email protected]> wrote:

I have plotted some circles corresponding to cities on a map, where the circles are proportional to the population of the city.
Naturally this has led to some circles overlapping. When you pan around, in some orientations the the outlines of all circles appear.. however in others only the bigger circle is shown.
Is there a way I can ensure that all circles are visible no matter what orientation?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2d09b7b5-a3a4-4b18-9c83-0e6e5c3d4e77%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.