Line 5 generates a graph object and tells it to take place within our newly generated window. Line 9 creates a vector, actually a Python tuple, of x-coordinates. You can alternatively use a Pmw. Vector object to store your data. In practice this will be more convenient since changes to a Pmw.
Vector are automatically updated in the graph.
Line 10 creates the tuple of y-coordinates. Of course, any set of coordinates could be entered. Line 13 inserts a graph into the plotting area with a label, x data, and y data. Line 15 gives control to the Tkinter-package, which enters an event loop and waits for user input. If you want to try it for yourself, you may try a somewhat more complete and extendible version of the Hello World example above.