0

I am using matplotlib to plot some texts. Specifically, I want the width of the character to be fixed, while the height of the character to be propositional to its frequency in the text. For example, in the following sentence, "hello world", there are seven unique characters, i.e., 'd', 'e', 'h', 'l', 'o', 'r', 'w'. In the expected plotting, each character will have the same width, e.g., 1, while the height of 'l' is greater than the the height of other characters. For example, if the height of 'l' is 3, then the height of 'o' is 2 and the height of the rest characters is 1.

J.G
  • 190
  • 3
  • 13

0 Answers0