1
## Copyright (C) 1996, 1997 John W. Eaton
3
## This file is part of Octave.
5
## Octave is free software; you can redistribute it and/or modify it
6
## under the terms of the GNU General Public License as published by
7
## the Free Software Foundation; either version 2, or (at your option)
10
## Octave is distributed in the hope that it will be useful, but
11
## WITHOUT ANY WARRANTY; without even the implied warranty of
12
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
## General Public License for more details.
15
## You should have received a copy of the GNU General Public License
16
## along with Octave; see the file COPYING. If not, write to the Free
17
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21
## @deftypefn {Function File} {} __plt2vm__ (@var{x}, @var{y}, @var{fmt})
26
## Modified Jan. 2003 -- Added TeXmacs interface support
27
## Author: Michael Graffam
29
function __plt2vm__ (x, y, fmt)
31
if (nargin < 2 || nargin > 3)
32
msg = sprintf ("__plt2vm__ (x, y)\n");
33
msg = sprintf ("%s __plt2vm__ (x, y, fmt)", msg);
35
elseif (nargin == 2 || fmt == "")
36
fmt = " "; ## Yes, this is intentionally not an empty string!
39
[x_nr, x_nc] = size (x);
40
[y_nr, y_nc] = size (y);
42
if (length(getenv("TEXMACS_PATH"))>0)
43
gset output '/tmp/tmplot.eps';
61
error ("__plt2vm__: matrix dimensions must match");
68
cmd = sprintf ("gplot tmp(:,%d:%d:%d) %s", 1, x_nc, x_nc+1,
69
deblank (fmt (k, :)));
74
cmd = sprintf ("%s, tmp(:,%d:%d:%d) %s", cmd, 1, i, i+1,
75
deblank (fmt (k, :)));
81
if (length(getenv("TEXMACS_PATH"))>0)
82
P=[2;112;115;58]; #P= "\002ps:"
83
g=fopen("/tmp/tmplot.eps");
86
g=fopen("/tmp/tmplot.eps");
96
disp(sprintf("%cverbatim:\n",2));
98
system("rm /tmp/tmplot.eps");
102
error ("__plt2vm__: arguments must be a matrices");