通过python 的matplotlib库,对数据进行柱状图的可视化,横坐标为分类,纵坐标为数值。
// An highlighted block
#coding:utf-8
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.family'] = 'SimHei'
def show_value_view():
name_list = ['A1', 'B1', 'C1', 'D1', 'E1', 'F1', 'G1', 'H1']
num_list = [33, 44, 53, 16, 11, 17, 17, 10]
y = [5,6,9,8]
x = ["x1","x2","x3","x4"]
show(name_list,num_list)
show1(x,y)
def show(x,y):
plt.figure(figsize=(16,6))
plt.tick_params(labelsize=18)
plt.xticks