When you export from matplotlib into Illustrator, there are a few… leftovers that need to be taken care of. It’s especially obvious with scatterplots - your circles are surrounded by a ton of path elements that don’t actually include content, they just get in the way.

Removing empty path elements

  1. In the Layers window, click the arrow to the left of the layer name to expand out all of its elements.
  2. You’ll see a list of elements in the layer. Scroll until you find one that says <Path> with an empty white box to the left. Click the circle/selection button to the right of “<Path>” to select this element.
  3. Take a look at the control panel up top to make sure that both fill and stroke are empty. Sometimes small elements look like nothing on the preview, but are actually content.
  4. Use Select > Same > Fill and Stroke to select everything with the same fill and stroke (no fill, no stroke). Your screen should light up with blue selections.
  5. Press delete. All of the blue should disappear, but your chart should look the same.
  6. There still might be a few bits left behind: experiment with Select > Same, or move the rest of your content into named layers, then go back and delete anything remaining.