'Set the pen used for drawing text, axes, ticks, and grid lines.
If no arguments are given, the default foreground color will be used
(see :func:`setConfigOption <pyqtgraph.setConfigOption>`).'

def setPen(self, *args, **kwargs):

    self.picture = None
    if (args or kwargs):
        self._pen = fn.mkPen(*args, **kwargs)
    else:
        self._pen = fn.mkPen(getConfigOption('foreground'))
    self.labelStyle['color'] = ('#' + fn.colorStr(self._pen.color())[:6])
    self.setLabel()
    self.update()
