<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_waveform(self, waveform):
 """ Add a waveform to the plot. :param waveform: the waveform to be added :type waveform: :class:`~aeneas.plotter.PlotWaveform` :raises: TypeError: if ``waveform`` is not an instance of :class:`~aeneas.plotter.PlotWaveform` """

        if not isinstance(waveform, PlotWaveform):
            self.log_exc(u"waveform must be an instance of PlotWaveform", None, True, TypeError)
        self.waveform = waveform
        self.log(u"Added waveform")