matplotlib官方案例如下:
Select indices from a collection using polygon selector — Matplotlib 3.6.0 documentationqhttps://matplotlib.org/stable/gallery/widgets/polygon_selector_demo.html可对散点图进行多边形框选功能,选中的数据自动变为蓝色实体点,未选中的则为空心点。
官方文档中并没有说明如何将框选的数据点,自定义颜色。通过研究官方文档发现,
SelectFromCollection类中,定义的有个属性,self.fc = collection.get_facecolors(),
但是官方案例中&#x