IaGraph
Examples: General Contour PlotsAll examples below use the following import statements and data:
>>> import Numeric as N >>> from IaGraph import * >>> x = N.arange(29) * 10.0 >>> y = N.arange(21) * 10.0 - 100.0 >>> data = N.outerproduct( N.sin(y*N.pi/360.) \ ... , N.cos((x-140.)*N.pi/360.))
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 contour
command, type help(contour)
.
>>> contour(data, x, y)
>>> contour(data, x, y, plottype="line")
>>> contour(data, x, y, plottype="fill")
>>> contour( data, x, y \ ... , title='My Plot', xtitle='X-Axis', ytitle='Y-Axis' \ ... , c_levels=[ -0.8, -0.4, -0.35, -0.3 \ ... , 0.0, 0.2, 0.3, 0.5, 0.55, 0.9 ] )
>>> contour( data, x, y \ ... , annot='This is my plot.\nBy Johnny Lin\n' \ ... +'December 2003\n\n' \ ... +'University of Chicago\nClimate Systems Center' \ ... , title='My Plot', xtitle='X-Axis', ytitle='Y-Axis' \ ... , ctindex=11, colorbar=0 )
>>> contour(data, x, y, xrange=[80,180], yrange=[-20,80])
Return to IaGraph Home Page.
Return to Johnny Lin's Python
Library.
Updated: December 19, 2003 by Johnny Lin <email address>. License.