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

@_Finch An update to Anaconda Code was just released. It changes how images are returned to Excel and should solve the issues you are seeing.

If you continue to have issues with images generated by Anaconda Code, please raise another issue. And thank you for bringing attention to this issue.

1 Like

Thanks Jim,

This all seems to be sorted now. Plotting individual plots with no issues.

To supply more feedback to both you and @OwenPrice. I did some further testing and found that it helped my issue when I uninstalled the Pyxll add-on that I also had installed. Pyxll was not being utilized in the workbook but just having it installed was creating issues.

Hope this helps future users.

Thanks!

1 Like