I have a big dictionary containing frequencies, like this:
frequency = {3: 231, 6: 373, 8: 455}
where the dictionary keys represent the lengths of the sentences and the values the number of sentences with that length.
I created the bar plot like this:
fig, ax = plt.subplots()
ax.bar(list(frequency.keys()), frequency.values(), log=True, color='g', width=0.5)
ax.set_title('DISTRIBUTION OF SENTENCE LENGTH')
ax.set_xlabel('Sentence length')
ax.set_ylabel('Frequency')
plt.show()
the result is correct and is the following:
now what I would like to do is to draw the distribution of these values. Something like that:
How can I do? I have already tried to follow this post (and others like this), but with poor results. Thank you!