I am trying to remove some data plotted as a scatter plot on matplotlib in python. I plot some scatter data and some 'plot' line data
To remove the 'plot' line data I use :
What is the equivalent command to remove a scatter plot? I cannot seem to find it.
Oz123's answer partially answers this question, but his solution would inflate the size of your plot in memory linearly. If you're dealing with a lot of data, this isn't an option.
Thankfully, one of the scatterplot object's methods is
If you change the line
abc.remove(), the results look the same, except the scatterplot is now actually removed from the plot, instead of being set to not visible.