Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Mon Aug 22 14:57:24 CEST 2011

Hyun-su wrote:
> I have a file which is 3D data ([pixel_x, pixel_y, pixel_z])
> I want to plot and write into other file as 1 dimension ([:, y_cut,
> z_cut])
> How can I do it?

I'd write a loop along these lines:

  with open(outputfile, 'w') as o:
      for pixel_x, pixel_y, pixel_z in input_data:

If you want a better suggestion, I'd suggest that you provide more info. 
Also, and that is very important, you should indicate which efforts you 
already too. In particular, I'd suggest the introductory tutorial on Python 
(see http://docs.python.org) and E.S. Raymonds essay on smart questions 
(search the web for it). If you don't show effort, people will assume you 
are lazy and just need someone to do your homework for you.

Good luck!


Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

More information about the Python-list mailing list