当前位置:网站首页>报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
2022-08-01 04:36:00 【hi_1900】
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
修改前:
import matplotlib as plt
plt.figure()
plt.imshow(trainImages[10])
plt.colorbar()
plt.grid(False)
修改为:import matplotlib.pyplot as plt
修改后:
import matplotlib.pyplot as plt
plt.figure()
plt.imshow(trainImages[10])
plt.colorbar()
plt.grid(False)
边栏推荐
猜你喜欢

typescript23-元组

C# | 使用Json序列化对象时忽略只读的属性

typescript27 - what about enumeration types

律师解读 | 枪炮还是玫瑰?从大厂之争谈元宇宙互操作性

The maximum quantity leetcode6133. Grouping (medium)
![Valentine's Day Romantic 3D Photo Wall [with source code]](/img/a9/2c26f4f048f3c0a9a65551bc734233.png)
Valentine's Day Romantic 3D Photo Wall [with source code]

Make your Lottie support word wrapping in text fields

Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)

Interview Blitz 69: Is TCP Reliable?Why?

Introduction to the Elastic Stack
随机推荐
Software Testing Weekly (Issue 82): In fact, all those who are entangled in making choices already have the answer in their hearts, and consultation is just to get the choice that they prefer.
The difference between scheduleWithFixedDelay and scheduleAtFixedRate
Mysql基础篇(约束)
Mysql中的数据类型和运算符
MySQL4
The Flow Of Percona Toolkit pt-table-checksum
MySQL3
Unity's primary method for implementing PlanarReflection under the BuildIn rendering pipeline
typescript21-接口和类型别名的对比
August 22 Promotion Ambassador Extra Reward Rules
【云原生之kubernetes实战】kubernetes集群的检测工具——popeye
解决ffmpeg使用screen-capture-recorder录屏,有屏幕缩放的情况下录不全的问题
leetcode6132. Make all elements in an array equal to zero (simple, weekly)
typescript20-接口
阿叶的目标
Unknown Bounded Array
2. # code comments
基于ProXmoX VE的虚拟化家庭服务器(篇一)—ProXmoX VE 安装及基础配置
干货!如何使用仪表构造SRv6-TE性能测试环境
In the shake database, I want to synchronize the data of the source db0 to the destination db5, how to set the parameters?