0

I'm trying to make a scatterplot that avoids overlapping symbols. To do this, I can jitter along one of my axes (in this case my x value) if symbols are overlapping. My symbols all have different sizes.

Does anyone know a way to keep track of the space in the axis that is filled by existing symbols? If that is possible, I can easily make an algorithm to check if the space for a symbol is taken and move it until it is not conflicting.

I'm including an image of a draft scatterplot where I have randomly jittered the values on the X axis. I'd like to be able to do something that guarantees non-overlap instead of this.

Thanks! draft scatter image

enter image description here

tacaswell
  • 84,579
  • 22
  • 210
  • 199
c-wilson
  • 395
  • 3
  • 11
  • This seems like an unbelievable amount of work to do such an unimportant task. Is there any other workaround you can think about doing? Why is it that important that every point get its own space? – Ted Petrou Dec 20 '16 at 20:35
  • https://stackoverflow.com/questions/14938541/how-to-improve-the-label-placement-for-matplotlib-scatter-chart-code-algorithm/15859652#15859652 might point you in a reasonable direction – tacaswell Dec 20 '16 at 21:12
  • Are you re-inventing `seaborn`'s swarmplot? – Phlya Jan 10 '17 at 00:08

0 Answers0