## quiver3() does not work with legend() in GNU Octave 4.4.0.
## Thomas Hellsén, June 21, 2018
close all
clear all
## Plot a line.
t = 0:0.1:3;
x = t;
y = 0.5*t;
z = t .^2;
plot3(x,y,z,'color','r')
hold on
xlabel("X axis")
ylabel("Y axis")
zlabel("Z axis")
## Plot some vectors from the line.
vx = cos(t);
vy = sin(t);
vz = t;
quiver3(x,y,z,vx,vy,vz,0.3,'color','b')
## If you comment the three legend lines below, the 3D graph displays normally,
## otherwise there is a runtime error.
legend({"base line","vectors"})
legend('location','southwest')
legend('boxon')   # This line causes no harm, but doesn't seem to anything either.
