Re: Question on "write_table"

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 24 2013 - 21:35:10 MST

Xing,

You may try:

   NUM = (/1, 23/)
   DAY = (/12, 1234/)
   TEM = (/12.3, 15.3/)
   alist=[/NUM,DAY,TEM/]
   write_table("table.txt","w",alist,"%d %d %f")

You won't get true left-aligned matrix,
but a space separated matrix.

Wei

huangwei@ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Jan 24, 2013, at 4:48 PM, Xing Liu wrote:

> Hi friends,
>
> I tried you write a table which column left-alignment, like
> 1 23 3.5
> 2 123 23.5
> ........
>
> But I only can get the right-alignment one,like
> 1 23 3.5
> 2 123 23.5
>
> My code of the format part is:
>
> alist=[/NUM,DAY,TEM/]
> write_table("table.txt","w",alist,"%d %3.0i %4.1f")
>
> I'll appreciate if you could help me solve this problem, thanks!
>
> Xing
>
>
> --
> -------------------------------------------------
> Xing Liu
> Graduate Student(M.S.)
> Department of Agronomy
> Purdue University
> West Lafayette, IN
> Email: liu744@purdue.edu
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 24 21:35:30 2013

This archive was generated by hypermail 2.1.8 : Tue Jan 29 2013 - 22:44:26 MST