Alphabetical list Categories
qgline Generalized line drawing
Help text:

qgline(ptspec1, ptspec2, ...).
A PTSPEC is a cell array containing a sequence of commands from the following list:
       ABSDATA x y - Absolute data coordinates
       RELDATA dx dy - Relative data coordinates
       ABSPAPER x y - Absolute paper coordinates (in pt)
       RELPAPER dx dy - Relative data coordinates (in pt)
       ROTDATA xi eta - Rotate by atan2(eta, xi) in data space.
                                         (This affects subsequent relative positioning.)
       ROTPAPER phi - Rotate by phi radians. (This affects subsequent
                                         relative positioning.)
       RETRACT l - Retract preceding and following segments by L pt.
       RETRACT l1 l2 - Retract preceding and following segments by L1 and
                                         L2 pt respectively.
For instance,

         qgline({'absdata', 0, 1, 'relpaper', 5, 0}, ...
                       {'absdata', 0, 1, 'relpaper', 0, 5})

draws a line from 5 pt to the right of the point (0,1) in the graph to 5 pt above the point (1,0) on the graph.

Note: The rather cumbersome syntax of qgline makes qline and qplot more attractive for general usage. The same applies to qgarea versus qarea and qpatch. See also qshiftedline.

Example:

qfigure('qgline', 3, 3);

xx=[-1.5*pi:1.5*pi];

yy=cos(xx);

qmarker o solid

qmark(xx, yy);

N=length(xx)-1;

for n=1:N

    qgline({'absdata',xx(n),yy(n), 'retract', 10}, ...

            {'absdata',xx(n+1),yy(n+1), 'retract', 10});

end

QPlot Documentation — (C) Daniel Wagenaar, 2014