Error while building a network graph using matplotlib

后端 未结 1 1295
名媛妹妹
名媛妹妹 2021-01-24 22:35

File \"C:/Users/Vrushab PC/Downloads/Dissertation/untitled0.py\", line 125, in

matplotlib.rcParams[\'figure.figsize\'] = (50, 50)

NameError: name \'matplotlib\'

相关标签:
1条回答
  • 2021-01-24 23:09

    Try this:

    import matplotlib as mpl
    mpl.rcParams['figure.figsize'] = (50, 50)
    

    From matplotlib docs.

    You are importing pyplot framework from matplotlib(a part of matplotlib), you don't have access to the full matplotlib library until you do the above import as mpl. Now, you can use mpl alias to access rcParams.

    0 讨论(0)
提交回复
热议问题