IaGraph Examples: X-Y Line and Scatter Plots

Import Statements and Data

All examples below use the following import statements and data:

>>> import Numeric as N
>>> from IaGraph import *
>>> x = N.arange(15) / N.pi
>>> y = N.sin(x)

A link to the full source code for all the examples on this page is at the bottom of this page. For more information on the plot command, type help(plot).


Examples

Default (lines connected with square symbols)

>>> plot(x, y)

Larger asterisk for plot symbol, no connecting lines

>>> plot(x, y, psym=2, symht=14)

Add titles and annotation, and use long-dash for connecting lines

>>> plot( x, y, linestyle=5, xrange=[3, 4] \
...     , title='Partial Plot', xtitle='x', ytitle='sin(x)' \
...     , annot='This is my plot.\nBy Johnny Lin\n\n' \
...            +'University of Chicago\nClimate Systems Center\n' \
...            +'December 2003' )


Full Code For Examples


Return to IaGraph Home Page.
Return to Johnny Lin's Python Library.

Updated: December 23, 2003 by Johnny Lin <email address>. License.