You can do it using matplotlib pyplot bar.
This example considers that lii is the list of values to be counted.
If you already have the list of unique values and associated counts, you do not have to compute lii_unique and counts.
import matplotlib.pyplot as plt
lii = [46, 11, 9, 20, 3, 15, 8, 63, 11, 9, 24, 3, 5, 45, 51, 2, 23, 9, 17, 1, 1, 37, 29, 6, 3, 9, 25, 5, 43]
# This is a list of unique values appearing in the input list
lii_unique = list(set(lii))
# This is the corresponding count for each value
counts = [lii.count(value) for value in lii_unique]
barcontainer = plt.bar(range(len(lii_unique)),counts)
# Some labels and formatting to look more like the example
plt.bar_label(barcontainer,lii_unique, label_type='edge')
plt.axis('off')
plt.show()
Here is the output. The label above each bar is the value itself, while the length of the bar is the count for this value. For example, value 9 has the highest bar because it appears 4 times in the list.

plt.bar()instead ofplt.plot()matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.bar.htmlTypeError: bar() missing 1 required positional argument: 'height'barinstead ofplotdoesn;t mean replacing literally plot for bar, it means reading what bar does and adapting your code to use this new function