The way pl should be used, in or out of TablePlot, by programmers or users, is

# Turn off interactivity between commands.  Make it a habit, and it won't
# matter if somebody left pl.ion()!
# Forgetting it is slow but OK for newbies.
pl.ioff()

# Unless you really want to overlay on whatever was there before...
pl.clf()
# The group of plot commands.
pl.plot(x0, y0)
pl.plot(x1, y1)
# etc.
pl.xlabel("x axis (units)")
pl.ylabel("y axis (units)")
pl.title(ms) # Anything but "y axis vs. x axis"!

# Do this *before* pl.show(), or you'll lose the prompt and force the user to
# kill the plot window!
# It also allows the user to change the title, etc.
# Not needed if plotting straight to a file, but it should be harmless.
pl.ion()

pl.show()  # Ta da!

General matplotlib documentation is here. -- RobReid - 2010-05-19
Topic revision: r1 - 2010-05-19, RobReid
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback