Closes #18 Closes #19 Closes #20 Closes #21 Closes #22 Closes #23 Closes #24 Refs #25 Task: MIL-003#1
20 lines
980 B
Markdown
20 lines
980 B
Markdown
**English** · [Dansk](Step-9-Bar-Chart-da) · [Bahasa Malaysia](Step-9-Bar-Chart-ms)
|
|
|
|
# Step 9: A bar chart of the top 10 themes
|
|
|
|
**Question:** Which themes have the most sets?
|
|
|
|

|
|
|
|
## What the code does
|
|
|
|
`top_themes` keeps the first ten rows of the merged table and `top_themes_bar_chart` draws a bar chart with a larger figure (14 by 8), a 45 degree rotation of the theme names, larger fonts and axis labels. Star Wars, Town and Ninjago look like LEGO; Gear, Key Chain and Books show that LEGO sells much more than bricks.
|
|
|
|
## What you gained
|
|
|
|
- `.bar()` draws a bar chart from names and values.
|
|
- Figure size, rotated tick labels and axis labels make a chart readable.
|
|
- Slicing with `[:10]` keeps the top rows.
|
|
|
|
Previous: [Step-8-Merge](Step-8-Merge) · Next: [Summary](Summary)
|