plot_quotes_tree
plot_quotes_tree(data, label='comment', area='length', colour='black')Treemap of selected quotes.
Lays selected verbatims out as a treemap, each tile a comment sized by its length, so a slide can show real customer voice at a glance. Each quote is wrapped and sized to fill its tile. Pair it with sample_comments() or sample_comments_diverse(), which produce the comment / length columns it expects. Needs the quotes extra (squarify).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | pandas.DataFrame | Quotes, e.g. from sample_comments(). |
required |
| label | str | Text column. Default “comment”. | 'comment' |
| area | str | Tile-size column. Default “length”. | 'length' |
| colour | str | Tile border colour. Default “black”. | 'black' |
Returns
| Name | Type | Description |
|---|---|---|
| plotnine.ggplot | The chart. |
See Also
sample_comments, sample_comments_diverse
Examples
>>> plot_quotes_tree(sample_comments(podracing_survey, "nps_com", "show_com", n=5))