pen
Set pen parameters
Call signature:
pen(color=None, width=None, join=None, cap=None, pattern=None, alpha=None, id=None)
Help text:
All arguments are optional.
color may be a single character matlab color, or a 3- or 6-digit RGB specification or an [r, g, b] triplet, or 'none'.
width is line width (in millimeters or points), or 0 for hairline.
join must be one of: 'miter', 'bevel', 'round'.
cap must be one of: 'flat', 'square', 'round'.
pattern must be one of: 'solid', 'dash', 'dot', 'none'.
pattern may also be a tuple ('dash', vec) where vec is a vector of stroke and space lengths, or it may be a tuple ('dot', vec) where vec is a vector of space lengths (in millimeters or points).
alpha specifies transparency between 0 (transparent) and 1 (opaque).
id must be a single capital letter.
Note that the string 'none' is different from the Python constant None, the latter meaning "do not change."
pen() without any arguments restores the default pen: black, 0.175 mm (0.5 pt) wide, miter join, square cap, solid pattern, fully opaque.
Example:

import qplot as qp

import numpy as np

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

qp.pen('r', 2, id='A')

qp.plot([0, 1],[0, 0])

qp.pen('b', pattern=('dash', [10, 6, 1, 6]))

qp.plot([0, 1],[1, 1])

qp.pen('930', pattern=('dot', 6))

qp.plot([0, 1], [2, 2])

qp.pen([1, 0, 1], pattern='solid')

qp.plot([0, 1], [3, 3])

qp.pen('k', 10, join='miter', cap='round')

qp.plot([.3, .5, .7],[.2, .8, .2])

qp.pen('k', 10, join='round', cap='square')

qp.plot([.3, .5, .7], np.array([.2, .8, .2])+1)

qp.pen('k', join='bevel', cap='flat', width=10)

qp.plot([.3, .5, .7], np.array([.2, .8, .2])+2)

qp.pen(id='A')

qp.plot([.4, .6], [.2, .2])