我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用matplotlib.collections()。
def _remove_all_artists(self): for value in self._mplot_objects.values(): # String is a sequence too, but it will not be here if isinstance(value, collections.Sequence): for obj in value: if obj: obj.remove() else: if value: value.remove() self._mplot_objects = {}