09. 막대 그래프 (심화)
import matplotlib.pyplot as pltimport matplotlibmatplotlib.rcParams['font.family'] = 'Malgun Gothic'matplotlib.rcParams['font.size'] = 15matplotlib.rcParams['axes.unicode_minus'] = Falselabels = ['강백호', '서태웅', '정대만'] #이름values = [190, 187, 184] #키plt.barh(labels, values)labels = ['강백호', '서태웅', '정대만'] #이름values = [190, 187, 184] #키plt.barh(labels, values)plt.xlim(175,195) bar = plt.bar(labels, v..
2024. 6. 28.
08. 막대 그래프 (기본)
막대그래프 기본import matplotlib.pyplot as pltimport matplotlibmatplotlib.rcParams['font.family'] = 'Malgun Gothic'matplotlib.rcParams['font.size'] = 15matplotlib.rcParams['axes.unicode_minus'] = Falselabels = ['강백호', '서태웅', '정대만'] #이름values = [190, 187, 184] #키plt.bar(labels, values) labels = ['강백호', '서태웅', '정대만'] #이름values = [190, 187, 184] #키plt.bar(labels, values, color='r')labels = ['강백호', '서태웅', ..
2024. 6. 28.