/usr/share/plplot_octave/support/__pl_plot3.m is in octave-plplot 5.9.9-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ## Copyright (C) 1998-2003 Joao Cardoso.
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2 of the License, or (at your
## option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## This file is part of plplot_octave.
function __pl_plot3(x, y, z, c)
## __pl_plot3(x, y, z [, c])
global __pl
strm = plgstrm+1;
if (isvector(x) & isvector(y) & isvector(z))
if (columns(x) != 1)
x = x';
y = y';
z = z';
endif
if (length(x) != length(y) || length(x) != length(z))
error("__pl_plot3: x and y and z must have same size\n");
endif
[style, color, symbol, key_title] = __pl_opt (c);
xm = min(x); xM = max(x);
ym = min(y); yM = max(y);
zm = min(z); zM = max(z);
if (__pl.axis_st(strm))
xm = __pl.axis(strm,1); xM = __pl.axis(strm,2); # at least x always exist
if (length(__pl.axis) >= 4)
ym = __pl.axis(strm,3); yM = __pl.axis(strm,4);
else
__pl.axis(strm,3) = ym; __pl.axis(strm,4) = yM;
endif
if (length(__pl.axis) == 6)
zm = __pl.axis(strm,5); zM = __pl.axis(strm,6);
else
__pl.axis(strm,5) = zm; __pl.axis(strm,6) = zM;
endif
else # make axis() return current axis
__pl.axis(strm,1) = xm; __pl.axis(strm,2) = xM;
__pl.axis(strm,3) = ym; __pl.axis(strm,4) = yM;
__pl.axis(strm,5) = zm; __pl.axis(strm,6) = zM;
endif
if (!ishold)
plcol0(15);
__pl_plenv(-1.6, 1.6, -1.6, 2.6, 0, -2);
pllab("", "", tdeblank(__pl.tlabel(strm,:)));
plw3d(2, 2, 2, xm, xM, ym, yM, zm, zM,...
__pl.alt(strm), __pl.az(strm))
plbox3("bnstu", tdeblank(__pl.xlabel(strm,:)), 0.0, 0,...
"bnstu",tdeblank(__pl.ylabel(strm,:)), 0.0, 0,...
"bcdmnstuv", tdeblank(__pl.zlabel(strm,:)), 0.0, 0)
endif
plcol0(color)
switch (style)
case (1)
plpoin3(x, y, z, symbol);
plline3(x, y, z);
case (2)
plline3(x, y, z);
case (5)
plpoin3(x, y, z, symbol);
case (6)
plpoin3(x, y, z, symbol);
endswitch
plflush;pleop;
__pl.items(strm) = 1; # for now!
endif
endfunction
|