plot_insight_card()
Plots a solid color card with large stylized text and an optional bottom image graphic. Best for hero statistics, key metric callouts, and executive summary highlights.
Quick Example
import clean_charts as cc
cc.plot_insight_card(
text="Record-breaking $4.2B in Revenue",
subtext="Driven by a massive 45% surge in Enterprise Cloud subscriptions across the APAC region.",
image_path="3d.png",
bg_color="#fff",
text_color="#000",
)
Parameters
| Parameter | Type | Default | Scope | Description |
|---|---|---|---|---|
output_path | str | None | None | Common | File path to save. |
width | int | None | Auto | Common | Image width in pixels. |
height | int | None | Auto | Common | Image height in pixels. |
aspect_ratio | str | None | None | Common | "square", "landscape", etc. |
title | str | None | None | Common | Bold header text. |
subtitle | str | None | None | Common | Secondary text. |
bg_color | str | None | "#f4f3f0" | Common | Background hex color. |
scale_text | bool | True | Common | Scale fonts proportionally. |
text | str | "" | Unique | The main insight or summary text (large, bold). |
subtext | str | "" | Unique | Secondary text displayed below the main text. |
image_path | str | None | None | Unique | Path to a raster image (PNG/JPG) rendered at the bottom of the card. |
text_color | str | "#000000" | Unique | Hex color for the text. |
Common Scenarios
Dark Theme Card
cc.plot_insight_card(
text="Record-breaking $4.2B in Revenue",
subtext="Driven by a massive 45% surge in Enterprise Cloud subscriptions across the APAC region.",
image_path="3d.png",
bg_color="#000",
text_color="#fff",
)