The code is giving me and error saying that there is no image. Any suggestions helpful It is saying that the image1 is not an image, which as you can see is not true as it is created when the code is run.
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from tkinter import *
from PIL import ImageTk, Image
import os
weatherdata = pd.read_csv('london_weather.csv')
#graph the data
sns.pairplot(weatherdata,
x_vars="pressure",
y_vars="precipitation",
hue="mean_temp",
aspect=3,
height=3)
plt.savefig('image1.png')
#All the code above is working however i cannot output the image, which is really annoying.
root = Tk()
img = ImageTk.PhotoImage(Image.open("image1.png"))
panel = Label(root, image = img)
panel.pack(side = "bottom", fill = "both", expand = "yes")
root.mainloop()