/usr/lib/scilab-plotlib/macros/_hold.sci is in scilab-plotlib 0.42-1.
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 | function _hold(varargin)
i=1;
ax=get('current_axes');
cmd=[];
while i<=length(varargin)
if typeof(varargin(i))=='pltlibH'
if varargin(i).handle.type=='Axes'
ax=varargin(i).handle;
else
_error("axis : handle should be an axes handle")
end
i=i+1;
elseif or(varargin(i)==['on','off'])
cmd=varargin(i);
i=i+1;
else
_error('hold : unknown hold state (must be ''on'' or ''off'')')
end
end
if cmd==[]
if ax.user_data.nextPlot=='add'
ax.user_data.nextPlot='erase'
disp('Current plot released')
else
ax.user_data.nextPlot='add';
disp('Current plot held')
end
elseif cmd=='on'
ax.user_data.nextPlot='add';
elseif cmd=='off'
ax.user_data.nextPlot='erase';
end
endfunction
|