Anaconda Code Plotting Multiple Plots Every Time Code Runs

Every time I run a simple plot code with Anaconda code it will plot multiple of the identical plot.

Additionally for this topic, each time the code runs it creates new plots. Is there a method to just overwrite the original plot instead?

Code example:

import seaborn as sns
import matplotlib.pyplot as plt

data = REF(“‘Sheet1’!B8:T48”)
df = pd.DataFrame(data)

ax = sns.scatterplot(data=df, x=7, y=6)

plt.xlabel(‘Column 8’)
plt.ylabel(‘Column 7’)
plt.tight_layout()

plt.show()

Hi and welcome!

I’m sorry to hear you’re experiencing difficulty with Anaconda Code.

So I can help, could you reply with which platform you’re using: Windows, Mac or Online, and with your Excel version number (from File>Account>About)

Thanks
Owen

Thanks for the quick reply!

I am using windows (not online) with Excel Version 2410 Build 16.0.18129.20100) 64-bit.

I have also found through doing some more trial and error that sometimes when the new plots recalculate it will randomly include some code or a plot from a separate visualization. For example the background on a scatter plot also has a bar chart overlaid.

Thanks!

Thanks for the extra information. If you’re able to share screenshots and preferably an example file, I can look into this further. I’m not able to replicate this issue at the moment but definitely want to get to the bottom of it.

Thanks
Owen