I’m using matplotlib’s collection, and in some cases I’d like to change the value of segment.
However, I don’t know how to change the segment of the collection.
That’s why I’m removing the existing collection and then creating and adding a new collection.
<code># the way i use it now
new_collections = {collection list}
for i in ax.collections: i.remove()
for i in new_collections: ax.add_collection(i)
ax.figure.canvas.draw()
</code>
<code># the way i use it now
new_collections = {collection list}
for i in ax.collections: i.remove()
for i in new_collections: ax.add_collection(i)
ax.figure.canvas.draw()
</code>
# the way i use it now
new_collections = {collection list}
for i in ax.collections: i.remove()
for i in new_collections: ax.add_collection(i)
ax.figure.canvas.draw()
I think it would be faster if I could only change segments of an existing collection rather than removing the existing collection and adding a new one.
Is this possible?
5