data-create-viz
When to use
Use this when you need one polished static chart — for a report, slide, or export — where clarity and correct chart-type choice matter more than interactivity.
Not for: an explorable multi-chart tool with filters (use data-build-dashboard), deciding whether a difference is significant (use data-statistical-analysis), or answering the underlying question (use data-analyze).
Method
- Name the message. Every chart makes one point. Write it as a sentence; the title should state that point, not just label axes.
- Choose the chart type by data relationship:
- Trend over time → line.
- Comparison across categories → horizontal bar, sorted by value.
- Part-to-whole → stacked bar, or (rarely, ≤4 slices) donut — never a pie for many slices.
- Distribution → histogram or box/violin.
- Correlation → scatter, with trend line only if a relationship is claimed.
- Composition over time → stacked area.
Decision point: if two encodings both fit, pick the one that puts the message on a position axis (bar/line) over area/angle.
- Build in Python (matplotlib/seaborn). Sort bars, start value axes at zero for bars, label directly instead of relying on legends.
- Design for legibility: high contrast, minimal gridlines, no chartjunk, colorblind-safe palette, readable fonts at final scale.
- Annotate the key point (peak, inflection, outlier) so the message is unmissable.
- Export at high resolution (PNG 2x, plus SVG when scalable output helps).
Example
Message: "Region West drives 40% of revenue." A pie of 8 regions hides it; a sorted horizontal bar makes West's dominance instant.
import matplotlib.pyplot as plt
d = df.sort_values("revenue")
plt.barh(d.region, d.revenue)
plt.title("West drives 40% of revenue") # title = the point
plt.xlim(0, None) # bars start at zero
plt.tight_layout(); plt.savefig("rev_by_region@2x.png", dpi=200)
Pitfalls
- Titling with the metric ("Revenue by region") instead of the takeaway.
- Truncating a bar's value axis so a small difference looks huge.
- Pie/donut with many slices, forcing readers to compare angles.
- Encoding series in a red/green palette that colorblind viewers cannot separate.
Output format
Script: runnable Python
Image: exported file(s), descriptive filename (e.g. rev_by_region@2x.png)
Caption: one line stating the single takeaway
Source: data source, filters, time window
Verify axes, units, and totals before exporting. If the chosen type would mislead, fix it and say why.
1---2name: data-create-viz3version: 1.0.04description: Produce a publication-quality static visualization in Python with a deliberately chosen chart type and a message-first title.5author: matrixx00706tags: [visualization, python, matplotlib, charts, reporting, chart-choice]7capabilities: []8metadata:9 source: https://skillmd.com/skills/matrixx0070/data-create-viz10---1112# data-create-viz1314## When to use1516Use this when you need one polished static chart — for a report, slide, or export — where clarity and correct chart-type choice matter more than interactivity.1718**Not for:** an explorable multi-chart tool with filters (use data-build-dashboard), deciding whether a difference is significant (use data-statistical-analysis), or answering the underlying question (use data-analyze).1920## Method21221. **Name the message.** Every chart makes one point. Write it as a sentence; the title should state that point, not just label axes.232. **Choose the chart type by data relationship:**24 - Trend over time → line.25 - Comparison across categories → horizontal bar, sorted by value.26 - Part-to-whole → stacked bar, or (rarely, ≤4 slices) donut — never a pie for many slices.27 - Distribution → histogram or box/violin.28 - Correlation → scatter, with trend line only if a relationship is claimed.29 - Composition over time → stacked area.30 Decision point: if two encodings both fit, pick the one that puts the message on a position axis (bar/line) over area/angle.313. **Build in Python** (matplotlib/seaborn). Sort bars, start value axes at zero for bars, label directly instead of relying on legends.324. **Design for legibility:** high contrast, minimal gridlines, no chartjunk, colorblind-safe palette, readable fonts at final scale.335. **Annotate** the key point (peak, inflection, outlier) so the message is unmissable.346. **Export** at high resolution (PNG 2x, plus SVG when scalable output helps).3536## Example3738Message: "Region West drives 40% of revenue." A pie of 8 regions hides it; a sorted horizontal bar makes West's dominance instant.3940```python41import matplotlib.pyplot as plt42d = df.sort_values("revenue")43plt.barh(d.region, d.revenue)44plt.title("West drives 40% of revenue") # title = the point45plt.xlim(0, None) # bars start at zero46plt.tight_layout(); plt.savefig("rev_by_region@2x.png", dpi=200)47```4849## Pitfalls5051- Titling with the metric ("Revenue by region") instead of the takeaway.52- Truncating a bar's value axis so a small difference looks huge.53- Pie/donut with many slices, forcing readers to compare angles.54- Encoding series in a red/green palette that colorblind viewers cannot separate.5556## Output format5758```59Script: runnable Python60Image: exported file(s), descriptive filename (e.g. rev_by_region@2x.png)61Caption: one line stating the single takeaway62Source: data source, filters, time window63```6465Verify axes, units, and totals before exporting. If the chosen type would mislead, fix it and say why.