pen(color=None, width=None, join=None, cap=None, pattern=None, alpha=None, id=None)
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'. Color may also be
'-' to reset a pen completely.
width is linewidth in 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.
alpha specifies transparency between 0 and 1.
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."
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])