'Matplotlib: make more than one selection using Polygon Selector

I want to use PolygonSelector to select multiple areas, like this:

enter image description here

How should I modify the example Polygon Selector code here ? Currently, it only allows to make one selection.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source