Alphabetical list Categories
gline2 Generalized line drawing
Call signature:

gline2(vglcs)

Help text:

qgline([cmd1, cmd2, ...]) specifies a line in mixed data and paper coordinates. Commands are as in gline, but in this case their arguments are vectors. gline2 does not support the at, atx, and aty commands.


For instance,


   gline2([AbsData([0, 2], [1, 3]), RelPaper([5, 0], [0, 7])])

Draws a line from 5 pt to the right of the point (0, 1) in the graph to 7 pt below the point (2, 3) in the graph. (Note that paper y-coordinates increase toward the bottom of the graph while data y-coordinates increase toward the top.)

Example:

import pyqplot as qp

import numpy as np

qp.figure('gline2', 3, 3)

xx = np.arange(-1.5*np.pi, 1.5*np.pi)

yy = np.cos(xx)

qp.marker('o', fill='solid')

qp.mark(xx, yy)

N=len(xx)

qp.gline2([qp.AbsData(xx, yy), qp.Retract(10)])

QPlot Documentation — (C) Daniel Wagenaar, 2019