Phyton MatPlotLib Scatterplot removal python matplotlib scatter plot example,python matplotlib scatter plot marker

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 : del self.plot1.lines[0]

What is the equivalent command to remove a scatter plot? I cannot seem to find it.

Answer:1

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 remove.

If you change the line abc.set_visible(False) to abc.remove(), the results look the same, except the scatterplot is now actually removed from the plot, instead of being set to not visible.

Answer:2



  1. python matplotlib scatter plot example
  2. python matplotlib scatter plot marker size
  3. python matplotlib scatter plot legend
  4. python matplotlib scatter plot color
  5. python matplotlib scatter plot with lines
  6. python matplotlib scatter plot marker
  7. python matplotlib scatter plot color by category
  8. python matplotlib scatter plot multiple series

I want to start learning more about using SWIG and other methods to interface Python and C++. To get started, I wanted to compile this simple program mentioned in another post: #include <Python.h&...

I want to start learning more about using SWIG and other methods to interface Python and C++. To get started, I wanted to compile this simple program mentioned in another post: #include <Python.h&...

I am writing a Python application that queries social media APIs via cURL. Most of the different servers I query (Google+, Reddit, Twitter, Facebook, others) have cURL complaining: additional stuff ...

I am writing a Python application that queries social media APIs via cURL. Most of the different servers I query (Google+, Reddit, Twitter, Facebook, others) have cURL complaining: additional stuff ...