here's a short scriptfile i wrote to do a "stem" plot in octave.
comments, etc.,: mann@eecg.toronto.edu
function mystemisnotmatlabstem(g);
[M,N]=size(g);
if min(M,N) > 1
% error("input must be vector (1d)");
disp("stem: input must be vector (1d)");
return;
end%if
L=max(M,N);
plot(0:L-1,g,'2o'); % 1 means green, 'o' means small circle
gset nokey;
hold on
for l=0:L-1;
plot([l,l],[0,g(l+1)],'1'); % make these plots all color 1 (red)
end%for
plot([0,L-1], [0,0],'3')
hold off