Matplotlib pyplot.title(string) returns error

前端 未结 8 552
名媛妹妹
名媛妹妹 2021-01-01 10:56

When I call pyplot.title(\'some string\') it throws the exception, \'str\' object is not callable\'. I copied the following from the matplotlib onl

相关标签:
8条回答
  • 2021-01-01 11:23

    Without restarting, I've found that changing to a .set_title() method following my plotting method has resulted in a successful pass without an error.

    0 讨论(0)
  • 2021-01-01 11:23

    No need to Reinstall any libraries. To overcome the issue, you can just restart the Jupyter kernel. This happens when you set plt.title = 'something'. It overrides the PyPlot functions and make them inaccessible. Restarting the kernel will help you out.

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