Draw multiple parameter box plots

Use matplotlib to draw box plots of the data set features G1, G2, G3 (in the order G1, G2, G3)

Draw the demand image in a sub-figure

import pandas as pd
import matplotlib.pyplot as plt
fig = plt.figure(figsize = (10, 10))
data = pd.read_csv('newdata.csv')

# 绘制
scores = ['G1', 'G2', 'G3']
grades_df = data[scores]
grades_df.boxplot()

Guess you like

Origin blog.csdn.net/weixin_44039266/article/details/106074153