[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
timefmt with splot?
From: |
Dirk Eddelbuettel |
Subject: |
timefmt with splot? |
Date: |
Thu, 8 Oct 1998 18:41:12 -0400 (EDT) |
Colin> I have tried to use "using" but I cannot figure out what arguments
Colin> to pass to it. Any ideas?
I tried similar things with 2d plots, and it failed exactly there.
However, I got it to work starting from a working setup in 'plain gnuplot'
(ie outside of Octave) and to then to pass those very commands to gnuplot
in a pipe. Ie
fid = popen("gnuplot", "w");
fputs(fid, "set timefmt \"%Y%m%d\"\n"); <---------- parse time
fputs(fid, "set xdata time\n"); <---------- & display time
fputs(fid, "set format x \"%m/%y\"\n"); <---------- this way
[... more settings omitted ...]
fputs(fid, sprintf(["plot [\"%d\":\"%d\"] \"%s\" u 1:2 ax x1y1, ", \
"'' u 1:3 ax x1y2\n"], \
fromdate, todate, tmpfile));
pclose(fid);
You can also write your data to the same pipe, try 'help plot datafile'
from within gnuplot.
Hope this helps, Dirk
--
Linux is not only free; it is, arguably, a better operating system, offering
a degree of stability and an ability to scale up that NT cannot match.
-- The Economist, Oct 3, 1998