python中的plot函数有什么用

python中的plot函数有什么用

这篇文章主要介绍了python中的plot函数有什么用,具有一定借鉴价值,需要的朋友可以参考下。希望大家阅读完这篇文章后大有收获。下面让小编带着大家一起了解一下。

下面我们将通过一组实例的演示,直观的给大家呈现:

效果演示:

python中的plot函数有什么用

实现代码:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# 随机生成1000个数据
df = pd.Series(np.random.randn(1000),index=np.arange(1000),name='d')
df.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x1e35acc5f28>

感谢你能够认真阅读完这篇文章,希望小编分享python中的plot函数有什么用内容对大家有帮助,同时也希望大家多多支持亿速云,关注行业资讯频道,遇到问题就找亿速云,详细的解决方法等着你来学习!