optionsconsult other tk and tkinter references right nowart class is about to begin canvas when it comes to graphicsthe tkinter canvas widget is the most free-form device in the library it' place to draw shapesmove objects dynamicallyand place other kinds of widgets the canvas is based on structured graphic object modeleverything drawn on canvas can be processed as an object you can get down to the pixel-by-pixel level in canvasbut you can also deal in terms of larger objects such as shapesphotosand embedded widgets the net result makes the canvas powerful enough to support everything from simple paint programs to full-scale visualization and animation basic canvas operations canvases are ubiquitous in much nontrivial gui workand we'll see larger canvas examples show up later in this book under the names pydrawpyphotopyviewpyclockand pytree for nowlet' jump right into an example that illustrates the basics example - runs most of the major canvas drawing methods example - pp \gui\tour\canvas py "demo all basic canvas interfacesfrom tkinter import canvas canvas(width= height= bg='white'canvas pack(expand=yesfill=both , is top left corner increases downright canvas create_line( canvas create_line( for in range( )canvas create_line( ifromxfromytoxtoy draw shapes canvas create_oval( width= fill='blue'canvas create_arc( canvas create_rectangle( width= fill='red'canvas create_line( width= fill='green'photo=photoimage(file=/gifs/ora-lp gif'canvas create_image( image=photoanchor=nwembed photo widget label(canvastext='spam'fg='white'bg='black'widget pack(canvas create_window( window=widgetembed widget canvas create_text( text='ham'draw some text mainloop( tkinter tourpart