IaGraph Examples: Miscellaneous Tasks

Import Statements and Data

All examples below use the following import statements and data (if the example needs 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).

In these examples, I demonstrate a few miscellaneous tasks, particularly writing to file, altering system variables, and viewing a color table.


Examples

Make x-y plot, larger triangle for plot symbol, no connecting lines, tiny axis ticklabels and titles, large overall title in VCS font 2, write to GIF file

>>> sysvar = IaGraph.Sysvar()
>>> sysvar.__class__.x_fontht = 10
>>> sysvar.__class__.y_fontht = 10
>>> sysvar.__class__.p_fontht = 80
>>> sysvar.__class__.p_font = 2
>>> plot( x, y, psym=5, symht=14 \
...     , xtitle='x', ytitle='sin(x)', title='My Plot' )
>>> active2gif('myplot.gif')

Plot rainbow color table, write to GIF file

>>> plotct(13)
>>> active2gif('myplotct.gif')


Full Code For Examples


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

Updated: January 9, 2004 by Johnny Lin <email address>. License.