When the previous graph remains in Seaborn

solution

Seaborn is a wrapper library for Matplitlib. Therefore, Matplotlib can erase the previous graph.

from matplotlib import pyplot as plt

#Do this before drawing the graph and reset
plt.clf()

Just add the above plt.clf ().

Recommended Posts

When the previous graph remains in Seaborn
When the node disappears in rqt_graph
Behavior when returning in the with block
When the target is Ubuntu 16.04 in Ansible
Precautions when installing packages in the conda environment
When the axis and label overlap in matplotlib
What to do when the graph does not appear in jupyter (ipython) notebook
I tried to graph the packages installed in Python
When the selected object in bpy.context.selected_objects is not returned
Initial settings when using the foursquare API in python
[Python] Get the numbers in the graph image with OCR
Omit the decimal point of the graph scale in matplotlib
[Tips] Save / copy the graph displayed in Jupyter Lab
Embedding in datetime when only the time is known
Graph drawing in python
Draw graph in python
I wrote the basic operation of Seaborn in Jupyter Lab
Master the type in Python? (When should type check be done)
A memo when creating a directed graph using Graphviz in Python
Check in advance what happens when you execute the command
Solve the Japanese problem when using the CSV module in Python.
Change the message displayed when logging in to Raspberry Pi
The minimum methods to remember when aggregating data in Pandas
Graph the Poisson distribution and the Poisson cumulative distribution in Python and Java, respectively.