level 1
360度视角º
楼主
按照Python编程:从入门到实践(第2版)这本书的第十五章开头导入matplotlib,在导入后调用其函数报错:
代码:
import matplotlib.pyplot as plt
squares = [1, 4, 9, 16, 25]
fig, ax = plt.su
bp
lots()
ax.plot(squares, linewidth=3)
# 设置图表标题并给坐标轴加上标签。
ax.set_title("平方数", fontsize=24)
ax.set_xlabel("值", fontsize=14)
ax.set_ylabel("值的平方", fontsize=14)
# 设置刻度标记的大小。
ax.tick_params(axis='both', labelsize=14)
plt.show()
报错:
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 24179 (\N{CJK UNIFIED IDEOGRAPH-5E73}) missing from current font.
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 26041 (\N{CJK UNIFIED IDEOGRAPH-65B9}) missing from current font.
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from current font.
2022年03月17日 14点03分
1
代码:
import matplotlib.pyplot as plt
squares = [1, 4, 9, 16, 25]
fig, ax = plt.su
bp
lots()
ax.plot(squares, linewidth=3)
# 设置图表标题并给坐标轴加上标签。
ax.set_title("平方数", fontsize=24)
ax.set_xlabel("值", fontsize=14)
ax.set_ylabel("值的平方", fontsize=14)
# 设置刻度标记的大小。
ax.tick_params(axis='both', labelsize=14)
plt.show()
报错:
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 24179 (\N{CJK UNIFIED IDEOGRAPH-5E73}) missing from current font.
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 26041 (\N{CJK UNIFIED IDEOGRAPH-65B9}) missing from current font.
Warning (from warnings module):
File "E:\python\lib\tkinter\__init__.py", line 804
func(*args)
UserWarning: Glyph 25968 (\N{CJK UNIFIED IDEOGRAPH-6570}) missing from current font.
