layout | element | title | language |
---|---|---|---|
page |
notes |
A brief introduction to matplotlib |
Python |
import matplotlib.pyplot as p
p.plot(x, y, color_symbol_info)
color_symbol_info looks like 'bo-' for blue circles connected by a solid line
p.loglog(x, y)
p.semilogx(x, y)
p.hist(x, numberofbins)
p.xlabel('My x-axis name')
p.ylabel('My y-axis name')
p.axis([xmin, xmax, ymin, ymax])
p.hold(True)
p.hold(False)
p.subplot(number_of_rows_of_plots, number_of_cols_of_plots, position)
To start a new figure:
p.figure()