formatting a text file for display by other applications
4 posts
• Page 1 of 1
formatting a text file for display by other applications
I'm trying to write a flat text file to be displayed in 3D by GNUplot, but I can't seem to get the various pieces I need to do this to work. I start with three arrays of integers, x, y, and z, and then format them into a columnar arrangement with
⍕⍉(3,×/⍴M)⍴x,y,z
The result displays correctly and has ⎕DR 80. PutText doesn't like this even though the documentation says it requires 8-bit data. If I could get PutText to work, I might still have a problem because GNUplot expects Unicode text files. I need some advice on how to solve this.
⍕⍉(3,×/⍴M)⍴x,y,z
The result displays correctly and has ⎕DR 80. PutText doesn't like this even though the documentation says it requires 8-bit data. If I could get PutText to work, I might still have a problem because GNUplot expects Unicode text files. I need some advice on how to solve this.
- Stu
- Posts: 97
- Joined: Thu Dec 31, 2015 1:30 am
Re: formatting a text file for display by other applications
Just a guess but whatever PutText is it probably doesn't like 2d data. Try catenating a lineend after the array and ravelling the result.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: formatting a text file for display by other applications
PutText is in the Files namespace that comes with the current Dyalog distribution. When I display my 3-column array of coordinates on the screen, it looks like the newline character is already there because I get three correct columns.
- Stu
- Posts: 97
- Joined: Thu Dec 31, 2015 1:30 am
Re: formatting a text file for display by other applications
⍕⍉(3,×/⍴M)⍴x,y,zproduces a 2d character array with blanks between the data columns. If you assign it to a, then perhaps
(,a,⎕ucs 13)might be an acceptable argument to PutText. I don't know. Maybe it's objecting to something else.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group