matplotlib绘图(2)
plt.bar
colors=["#348ABD","#A60628"]
plt.bar([0,.7], prior, alpha=0.70, width=0.25, color...0.10,0.95], ["Librarian", "Farmer"])
#设置label
plt.set_xlabel("string")
plt.set_ylabel("string")
实例
%matplotlib...inline
import numpy as np
from matplotlib import pyplot as plt
colors=["#348ABD","#A60628"]
prior =...0.10,0.95], ["Librarian", "Farmer"])
plt.title(".......")
plt.ylabel("Prob")
plt.legend(loc="upper left")
matplotlib.legend.Legend