3
$\begingroup$

I have to analyze the novel Don Quixote, so I am trying to make a histogram where each bin is how many characters in a word, and the height being the frequency of words with that many characters.

$\endgroup$
1
  • 1
    $\begingroup$ There's an example of this in the documentation for WordCounts (under Applications). $\endgroup$
    – Carl Lange
    Commented Nov 11, 2019 at 2:04

1 Answer 1

4
$\begingroup$
Histogram[
 StringLength[
  ReadList[
    StringToStream[
      ExampleData[{"Text", "DonQuixoteIEnglish"}]], Word]], 20,
  ChartLabels -> Automatic]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.