matplotlib curve.py

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 2*np.pi, 100)
sinX = np.sin(x)
cosX = np.cos(x)

plt.plot(x, sinX)
plt.plot(x, cosX)

plt.show()

转载于:https://www.cnblogs.com/zhangchunbo/p/4215909.html

D:\jiqixuexi\main.py:64: MatplotlibDeprecationWarning: Support for FigureCanvases without a required_interactive_framework attribute was deprecated in Matplotlib 3.6 and will be removed two minor releases later. plt.plot(fpr, tpr, label='ROC curve (area = %0.2f)' % roc_auc) Traceback (most recent call last): File "D:\jiqixuexi\main.py", line 64, in <module> plt.plot(fpr, tpr, label='ROC curve (area = %0.2f)' % roc_auc) File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 2785, in plot return gca().plot( File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 2282, in gca return gcf().gca() File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 879, in gcf return figure() File "D:\2023.5.21\lib\site-packages\matplotlib\_api\deprecation.py", line 454, in wrapper return func(*args, **kwargs) File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 813, in figure manager = new_figure_manager( File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 382, in new_figure_manager _warn_if_gui_out_of_main_thread() File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 360, in _warn_if_gui_out_of_main_thread if _get_required_interactive_framework(_get_backend_mod()): File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 208, in _get_backend_mod switch_backend(rcParams._get("backend")) File "D:\2023.5.21\lib\site-packages\matplotlib\pyplot.py", line 331, in switch_backend manager_pyplot_show = vars(manager_class).get("pyplot_show") TypeError: vars() argument must have __dict__ attribute
06-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值