matplotlib\pandas的使用方法
import matplotlib.pyplot as plt
plt.plot(x,y,'r--',label=)
plt.show()
折线图、条形图、散点图、横向条形图
fig, ax = plt.subplots(nrows=2,ncols=2,figsize=(10,10))
ax[0,0].plot(x,y)
ax[0,0].bar(x,y) # can create multiple plots in same subplot
ax[0,1].scatter(x,y)
ax[1,0].bar(x,y)
ax[1,1].barh(x,y)
plt.show()```
标准注释法
```python
# line plot with artist element
fig, ax = plt.subplots()
ax.plot(x,y, color='red',linewidth=2, marker='o', linestyle='--', label = 'sales')
ax.set(xlim=[0, 50], ylim=[0, 60], title='Line Chart', ylabel='Y-Axis', xlabel='X-Axis')
ax.legend()plt.show()```
```python
# bar plot with artist element
fig, ax = plt.subplots()
ax.bar(x,y, color='green', label = 'sales')
ax.set(xlim=[0, 50], ylim=[0, 60], title='Bar Chart', ylabel='Y-Axis', xlabel='X-Axis')
ax.legend()
plt.show()
`