I am trying to write a letter recognition program and display some values on a histogram. But I cannot show the number of each letter and the number on the histogram. I am using matplotlib to create a histogram.
I was expecting that the histogram would show me the letters as x values and the numbers as y values. but it only shows the numbers as x values.
letters = pd.read_csv('C:/Users/Lenovo/Desktop/Yapay Zeka/odev1/letter_recognition.data')
dataframe = {
"x" : letters['Letter'].value_counts().index,
"y" : letters['Letter'].value_counts().values
}
son = pd.DataFrame(dataframe)
plt.hist(son)
plt.ylabel('numbers')
plt.xlabel('letters')
plt.show()