REFLINEXYZ(X,Y,Z) plots reference lines from the 3D points (X,Y,Z) to the three cartesian planes (YZ, XZ, & XY planes). The lines are drawn from the axes planes upto each point. X, Y and Z should have the same number of elements.
REFLINEXYZ(X,Y,Z,YZOFFSET, XZOFFSET, XYOFFSET) specifies the offset from the three planes. If an offset is omitted (or empty), the defaults are used, namely the lower limits of each axis. The offsets can be scalars, specifying the same offset for each point, or vectors with the same number of elements as the points, to specify the offset for each point individually.
The lines are plotted as a three graphics object. H = REFLINEXYZ(..) returns the three graphics handles of the lines to the YZ, XZ and XY planes in H.
REFLINEXYZ(..., 'Prop1', 'Val1', 'Prop2', 'Val2', ...) uses the properties and values specified for color, linestyle, etc. Execute GET(H), where H is a line handle, to see a list of line object properties and their current values. Execute SET(H) to see a list of line object properties and legal property values.
REFLINEXYZ uses the current axes, if any. Lines outside the plot area are plotted but not shown.
See also stem, plot3, refline, grid, axes
and gridxy and reflinexy (on the FEX)
Jos (10584) (2021). REFLINEXYZ (https://www.mathworks.com/matlabcentral/fileexchange/16746-reflinexyz), MATLAB Central File Exchange. Retrieved .
Oh, I missed this section after pause. Now it works like a charm! Thanks a lot!
The shadowed line is added in the third section of the example (note that I have added a pause statement after the second section, so you have to press a key). The third section reads:
% make a projection to xy-plane
hold on ; plot3(x,y,zeros(size(x)),'k.-') ; hold off ;
h = reflinexyz(x,y,z,'color','k','linestyle','-') ;
delete(h([1 2])) ; % delete the yz and xz projections
title ('Projection to XY plane') ;
I hope this works for you.
A very nice tool! But a short question for the example. In the logo of this function (in the upper left corner of this page) you managed to draw also the shadowed line into the xy plane, the example comes without the plot in the xy plane. Could you please provide the full example which created the logo file?? - 1000 thanks!!!
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!