[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inquiry of Octave to pgnuplot command log via pipe
From: |
Tatsuro MATSUOKA |
Subject: |
Inquiry of Octave to pgnuplot command log via pipe |
Date: |
Sat, 23 Feb 2008 19:36:45 +0900 (JST) |
Hello
I am now trying to make wgnuplot usable from the octave to modifying and/or
additional programs.
What I have done the first is the taking the pipe by modifying the pgnuplot
code.
One of problems of binary data of pipe was on the pgnuplot.
The 'stdin' on windows have text and binary mode.
The text mode catches cr+lf and eof codes and transfer them.
Therefore, the binary data could not be treated properly on pgnuplot.
I have set the 'stdin' to binary mode by,
_setmode(fileno(stdin), _O_BINARY);
and taking a log from pipe by
/* wait for commands on stdin, and pass them on to the wgnuplot text
* window */
while (fgets(psBuffer, BUFFER_SIZE, stdin) != NULL) {
fp=fopen("temp.dat", "ab"); // added
PostString(hwndText, psBuffer);
fputs(psBuffer, fp); // added
fclose(fp); // added
}
The octave command is
octave> plot (0:10);
The file attached is the log file.
Although data cannot be correct in the text mail but I show the problem point
********************************************
:
:
set palette positive color model RGB maxcolors 64;
set palette file "-" binary record=64 using 1:2:3:4;
?€?>・E?>8?B>plot "-" using ($1):($2) axes x1y1 title "" with lines
linestyle 1 \
;
1 0
2 1
3 2
4 3
5 4
6 5
7 6
8 7
9 8
10 9
11 10
e
********************************
In the gnuplot help
+++++++++++++
Binary palette files are supported as well,see binary general.Example:put 64
triplets of R,G,B doubles
into file palette.bin and load it by
set palette file "palette.bin"binary record=64 using 1:2:3
However,record causes gnuplot to not generate coordinate information. This is
for the case where such
information may be included in one of the columns of the binary data file.
++++++++++++++
The log tell me 'using 1:2:3:4' not 'using 1:2:3'.
What the forth is ?
I cannot understand the what octave would like to do.
Please give me advise.
Regards
Tatsuro
--------------------------------------
Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
http://pr.mail.yahoo.co.jp/toolbar/
temp.dat
Description: 1676260423-temp.dat
- Inquiry of Octave to pgnuplot command log via pipe,
Tatsuro MATSUOKA <=