I'm trying to display an Image in the canvas of tkinter window,the program runs perfectly but the image is not displaying in the canvas
import tkinter
from tkinter import *
from tkinter import ttk
import PIL
from PIL import Image,ImageTk
#-----------------------------------------------
root = Tk()
root.geometry("600x400")
toolbox = Frame(root,bg = "#494949",height = 50,width = 600,bd = 1,relief = RAISED)
toolbox.grid(row = 0,column = 0)
toolbox.grid_propagate(0)
openf = Button(toolbox,text = "Show Image",bg = "gray",width = 30,relief = FLAT,command = lambda:showimg())
openf.grid(row = 0,column =0,sticky = "news")
cj = Canvas(root,width = 600,height = 300,relief = SUNKEN,bd = 1,bg = "#494949")
cj.grid(row = 1,column = 0,sticky = "news")
def showimg():
g = ImageTk.PhotoImage(file = 'myphoto.png')
t = cj.create_image(0,0,image = g,anchor = NW)