'Line2D' object has no property 'line' error

I am trying to embed a Matplotlib plot in a PyQt5 subwindow written in Python. When I plot a line in the plot I get the error,

‘Line2D’ object has no property ‘line’

Below is the relevant code extracted from my application. Any help would be much appreciated and if anyone knows of a better way to do this that would be much appreciated too. Thank you in advance for your help.

from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
import matplotlib.pyplot as plt

self.figure = plt.figure(figsize=(plotWidth, plotHeight), dpi=dotsPerInch)
self.canvas = FigureCanvas(self.figure)
self.subPlot = self.figure.add_subplot(111)
#xData, yData are lists of data points
self.subPlot.plot(xData, yData, line=‘b.-’, label=lableText)