可视化工具:matplotlib
matplotlib API
import matplotlib.pyplot as plt
Figure和Subplot
fig = plt.figure() # 创建新的figure
ax1 = fig.add_subplot(2,2,1)
ax2 = fig.add_subplot(2,2,2)
ax3 = fig.add_subplot(2,2,3)
# 结果就是带有三个subplot的figure
from numpy.random import randn
plt.plot(randn(50

本文介绍了Python中的可视化工具,包括matplotlib API的使用,如Figure和Subplot的创建。同时探讨了pandas如何便捷地绘制线型图,指出Series和DataFrame的plot方法默认生成线型图,其索引会作为x轴,可利用xticks、yticks、xlim和ylim调整轴的刻度和范围。
最低0.47元/天 解锁文章
4117

被折叠的 条评论
为什么被折叠?



