Environment:7onez Cti expert Matplotlib
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Visualization |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Python 3.10+ environment with Matplotlib >= 3.7 and NumPy >= 1.24 for case timeline figures, Gantt charts, and analytic report figures.
Description
This environment provides the charting layer for IntelGraph: `case_timeline.py` renders a five-clock swimlane timeline (registration spans, registrant eras, hosting windows, certificate windows, archive visibility) as hi-res PNG + SVG + thumbnail. `gantt.py` renders Gantt and event timelines. The house report module uses Matplotlib indirectly through `house_report_charts.py` for analytic figures (confidence scatter, heatmap grids). A house-style theme (`theme.py`) ensures every figure shares the same font, colours, and DPI.
= Usage
Use this environment for the case timeline rendering and house report figure generation. It is the mandatory prerequisite for `Case_Timeline_Render` and `House_Report_Build` (for the figures sub-phase). Without Matplotlib, timeline output degrades to a markdown evidence table only (`--no-figure`).
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS / WSL2 | Same as Python_Stdlib |
| Hardware | Any CPU | 4GB RAM recommended for large timelines |
| Disk | 200MB | Matplotlib + NumPy + font cache |
Dependencies
System Packages
- `python3` >= 3.10
- A Vietnamese-capable font (e.g. `fonts-noto-core` on Linux) for VI-language timelines
Python Packages
- `matplotlib` >= 3.7
- `numpy` >= 1.24
Credentials
No credentials required. This is a pure computation/visualization library.
Quick Install
pip install "matplotlib>=3.7" "numpy>=1.24"
Code Evidence
Unified requirements listing Matplotlib, from `requirements.txt:21-24`:
# --- deliver / visualize (IntelGraph) ---
matplotlib>=3.7 # charts, timelines, gantt (theme.py house style)
...
numpy>=1.24 # heatmap / confidence-scatter grids (cti_report_figures.py)
Timeline figure output, from `intel_engine/IntelGraph/scripts/case_timeline.py:40-42`:
Writes <stem>_hires.png / <stem>.svg / <stem>_thumb.png (figure, needs matplotlib)
<stem>_events.json (evidence ledger + correlations)
<stem>.md (with --markdown) (paste-ready evidence table)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ImportError: No module named 'matplotlib'` | Matplotlib not installed | `pip install "matplotlib>=3.7"` or use `--no-figure` for markdown-only |
| Tofu boxes in PDF (VI labels) | No Vietnamese font installed | `apt install fonts-noto-core` (Linux) or equivalent |
| Figure too large / OOM | Hundreds of domains in one timeline | Filter to a subset; use `--no-figure` and render the markdown table |
Compatibility Notes
- Headless servers: Matplotlib must use the `Agg` backend on headless Linux. Set `MPLBACKEND=Agg` if not auto-detected.
- Font selection: A Vietnamese-capable font is auto-selected from fontconfig (`fc-list :lang=vi`). On a bare Linux box install `fonts-noto-core`.
- Graceful degradation: When Matplotlib is absent, `case_timeline.py` still writes the JSON evidence ledger and markdown table — only the figure is skipped.