[Matrix-SIG] How to a la IDL, TV, matrix_array
Sidey Timmins
Sidey Timmins <timmins@forest.gsfc.nasa.gov>
Tue, 17 Oct 2000 13:07:16 -0400 (EDT)
Hi:
As a new pythoner I am very impressed with Numpy.
But surely you can (via Tkinter) display a raster matrix easily.
(I dont want to write a file and then display a jpeg etc with the imaging
lib)
How do you display the matrix on the Numpy Topic guide page ?
(http://www.python.org/topics/scicomp/numpy.html):
>>> from Numeric import * # load NumPy
>>> xs = arange(-6, 6, .02) # create X indices
>>> ys = arange(-6, 6, .02)[:,NewAxis] # create Y indices
>>> sinx = sin(xs) # sin() on each
element of xs
>>> yx = cos(ys)*exp(-ys*ys/18.0) # same sort of thing
>>> zx = xs * xs # elementwise
multiplication
which results in an array zx which looks something like:
?????
Sidey Timmins
Code 923, Biospheric Sciences
NASA/GSFC Greenbelt Md