import os;import glob; import sys
import numpy as np
import scipy.ndimage as ndimage
from tqdm import tqdm, trange
import matplotlib.pyplot as plt
value = np.bincount(Maks.reshape(-1), weights=None, minlength=0)[1:]
title="hospital_patient"
xlabel="hospitals"
ylabel="patients"
title="SegClass"
xlabel="label"
ylabel="count"
plt.plot(value, color='r')
plt.bar(range(len(value)), height=value)
title = r"Histogram with '{}' bins".format(title)
xlabel = r"{}_({})".format(xlabel, "M")
ylabel = r"{}_({})".format(ylabel, "M")
# 显示图例
plt.title(label=title)
plt.xlabel(xlabel=xlabel)
plt.ylabel(ylabel=ylabel)
plt.legend()