# -*- coding: utf-8 -*-
"""
Created on Mon Nov 30 13:24:00 2015

@author: jx_luo
"""

from pandas import DataFrame, Series

import pandas as pd
import numpy as np

import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager

path=r'D:\Users\jx_luo\Documents\wait.txt'
frame=pd.read_csv(path,header=False,sep='\t')



f=pd.pivot_table(frame, index='createdate',values='wait',columns='paycategory' ,aggfunc=np.sum)


#ax = f.plot(subplots=True,figsize=(12,20),grid=False, title='wait ')

ax=f.plot()

legend = ax.legend()
font = font_manager.FontProperties(fname=r"C:\Windows\Fonts\simhei.ttf")

for text in legend.texts:
    text.set_font_properties(font)

plt.show()

 

相关文章:

  • 2021-12-04
  • 2021-12-06
  • 2021-09-13
  • 2021-11-25
  • 2021-08-30
  • 2021-09-07
  • 2022-02-10
  • 2021-11-24
猜你喜欢
  • 2021-05-07
  • 2022-12-23
  • 2021-10-29
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案