读取csv数据,并画出箱线图
import matplotlib.pyplot as plt
import pandas as pd
def draw_box(csv_file_path):
data = pd.read_csv(csv_file_path, encoding='utf-8')
plt.rc('font', family='Times New Roman')
data = data.iloc[:, 1:]
data.plot.box(title="difficulty rating")
plt.grid(linestyle="--", alpha=0.3)
plt.savefig('./results_imgs.png', bbox_inches='tight', dpi=300)
标签:线图,plt,pyplot,matplotlib,csv,data
From: https://www.cnblogs.com/crazyMint/p/17525690.html