How to get rid of Python Launcher icon every time a script runs?
I'm not familiar with pyplot, but from the documentation, it looks like the show() method 'holds onto' ("blocks") the script until it is closed by some user interaction.


  In non-interactive mode, display all figures and block until the
  figures have been closed;
  A single experimental keyword argument,
  block, may be set to True or False to override the blocking behavior
  described above.


Other methods like ginput() and waitforbuttonpress() describe the blocking process.

You could test this by commenting out the last line and see if the icons persist.