>>> I want to import binary files generated from C/FORTRAN into matplotlib for
>>> plotting. 

if it's just a block of bytes in a standard type from and n-d array, you 
can use numpy.fromfile()

If not, then you may have to read through the file in chunks, with 
various calls to file.read(), to get to the right point, then use 
numpy.fromfile(). If the data is in records with mixed types, then 
you'll need to use the struct module to read them, or possibly numpy 
record arrays and fromfile.

Note that FORTRAN "unformatted" records pad the data with 4 bytes before 
and after (at least with the compiler that produces some recent data I 
needed).

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to