AttributeError: module ‘matplotlib’ has no attribute ‘line’

Cause:

There is no attribute called line in matplotlib

[oracle@hydrupgrd ~]$ python3 pltrt.py
Database CPU Time Ratio|129|Database Wait Time Ratio|0|['D']
['a']
Traceback (most recent call last):
  File "pltrt.py", line 56, in <module>
    mp.line(stats,val, color='b', label = 'DB RESPONSE TIME')
AttributeError: module 'matplotlib' has no attribute 'line'

Solution:

To plot a line, use “PLOT” instead of “LINE” attribute

    mp.plot(stats,val, label = 'DB RESPONSE TIME')

Leave a Reply