comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Printing multiple columns in IDL
items: Re: Printing multiple columns in IDL

Printing multiple columns in IDL
type: item
description: Hello all, I'm having a problem with printing multiple columns in IDL. The data I want to print to text is 300 columns, with 141 rows. Right now it's printing them all out stacked on top of each other in one column.
creator: Ying Wu
date: 2008-07-31T02:18:07-00:00

Re: Printing multiple columns in IDL
type: item
description: Joost Aan de Brugh writes: > It is becoming more and more ironic. I tried Width=width + 2 and it > works. But of course, that does not solve the problem. It only removed > the symptom. Then I used the format statement. > > datalength = N_Elements(data[*,0]) > printf,lun,data,format=strjoin(['(',strtrim(string(datalengt h), > 2),'G16.8))']) > ; The format should make no sense because it is equal to the default > format for the double array. > > Though it should make no sense, it works Well, I don't know. I suspected extra spaces that you weren't accounting for, so the width+2 thing doesn't surprise me as much as it does you. I think the extra space is confirmed by the fact that the format statement works with the original width. That is, your assumption that the default format is the same as exactly 16*num spaces is probably incorrect, no matter what it looks like. :-) Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thui. ("Perhaps thou speakest truth.")
creator: David Fanning
date: 2008-08-01T15:03:13-00:00