Fixing legend of plot3