|
| 1 | +# Per-library metadata for matplotlib implementation of sankey-basic |
| 2 | +# Auto-generated by impl-generate.yml |
| 3 | + |
1 | 4 | library: matplotlib |
| 5 | +language: python |
2 | 6 | specification_id: sankey-basic |
3 | 7 | created: '2025-12-23T19:45:16Z' |
4 | | -updated: '2025-12-23T19:54:48Z' |
5 | | -generated_by: claude-opus-4-5-20251101 |
6 | | -workflow_run: 20469994054 |
7 | | -issue: 0 |
8 | | -python_version: 3.13.11 |
9 | | -library_version: 3.10.8 |
10 | | -preview_url: https://storage.googleapis.com/anyplot-images/plots/sankey-basic/matplotlib/plot.png |
11 | | -preview_html: null |
12 | | -quality_score: 91 |
13 | | -impl_tags: |
14 | | - dependencies: [] |
15 | | - techniques: [] |
16 | | - patterns: [] |
17 | | - dataprep: [] |
18 | | - styling: |
19 | | - - alpha-blending |
20 | | - - minimal-chrome |
| 8 | +updated: '2026-04-30T08:47:31Z' |
| 9 | +generated_by: claude-sonnet |
| 10 | +workflow_run: 25156094188 |
| 11 | +issue: 810 |
| 12 | +python_version: 3.13.13 |
| 13 | +library_version: 3.10.9 |
| 14 | +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/sankey-basic/python/matplotlib/plot-light.png |
| 15 | +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/sankey-basic/python/matplotlib/plot-dark.png |
| 16 | +preview_html_light: null |
| 17 | +preview_html_dark: null |
| 18 | +quality_score: null |
21 | 19 | review: |
22 | | - strengths: |
23 | | - - Excellent use of matplotlib Sankey module with two connected diagrams showing |
24 | | - realistic energy flow scenario |
25 | | - - Clear color distinction between input sources (blue) and output distribution (yellow) |
26 | | - aids comprehension |
27 | | - - All labels include both descriptive names and quantitative values with units (TWh) |
28 | | - - Energy balance is mathematically verified in code (300 TWh in = 200 TWh out + |
29 | | - 100 TWh losses) |
30 | | - - Clean layout with axes turned off and informative subtitle explaining the flow |
31 | | - pattern |
32 | | - - Appropriate font sizes (18pt labels, 26pt title) ensure readability at full resolution |
33 | | - weaknesses: |
34 | | - - Missing explicit legend to explain that blue represents primary energy sources |
35 | | - and yellow represents end-use distribution |
36 | | - - The assert statement adds slight complexity that could be replaced with a comment |
37 | | - image_description: "The plot displays a Sankey diagram illustrating national energy\ |
38 | | - \ flow. The diagram uses two distinct colors: blue (steel blue #306998) for the\ |
39 | | - \ primary energy sources and losses, and yellow/gold (#FFD43B) for the end-use\ |
40 | | - \ distribution. \n\n**Left side (blue flows):** Four input sources flow into a\ |
41 | | - \ central hub - Coal (120 TWh) from the bottom, Natural Gas (90 TWh) from the\ |
42 | | - \ left, Nuclear (60 TWh) from the top, and Renewables (30 TWh) from the top-left.\ |
43 | | - \ A Losses branch (100 TWh) exits downward from the hub.\n\n**Right side (yellow\ |
44 | | - \ flows):** The remaining 200 TWh flows to four end-use sectors - Industrial (80\ |
45 | | - \ TWh) upward, Transport (20 TWh) upper-right, Commercial (45 TWh) rightward,\ |
46 | | - \ and Residential (55 TWh) downward.\n\n**Title:** \"National Energy Flow · sankey-basic\ |
47 | | - \ · matplotlib · pyplots.ai\" at the top in bold.\n**Subtitle:** Italicized explanatory\ |
48 | | - \ text at the bottom describing the flow pattern.\n**Labels:** Each flow is labeled\ |
49 | | - \ with its name and TWh value in bold 18pt font.\n**Layout:** Clean white background,\ |
50 | | - \ axes are turned off, good use of canvas space." |
51 | | - criteria_checklist: |
52 | | - visual_quality: |
53 | | - score: 36 |
54 | | - max: 40 |
55 | | - items: |
56 | | - - id: VQ-01 |
57 | | - name: Text Legibility |
58 | | - score: 9 |
59 | | - max: 10 |
60 | | - passed: true |
61 | | - comment: All labels clearly readable with 18pt bold font, title at 26pt |
62 | | - - id: VQ-02 |
63 | | - name: No Overlap |
64 | | - score: 8 |
65 | | - max: 8 |
66 | | - passed: true |
67 | | - comment: No overlapping text elements, labels well positioned |
68 | | - - id: VQ-03 |
69 | | - name: Element Visibility |
70 | | - score: 7 |
71 | | - max: 8 |
72 | | - passed: true |
73 | | - comment: Flows are appropriately sized with good proportions, alpha=0.75 provides |
74 | | - visibility while allowing overlap perception |
75 | | - - id: VQ-04 |
76 | | - name: Color Accessibility |
77 | | - score: 5 |
78 | | - max: 5 |
79 | | - passed: true |
80 | | - comment: Blue and yellow are colorblind-safe and provide excellent contrast |
81 | | - - id: VQ-05 |
82 | | - name: Layout Balance |
83 | | - score: 4 |
84 | | - max: 5 |
85 | | - passed: true |
86 | | - comment: Good canvas utilization, diagram fills most of the space, minor asymmetry |
87 | | - on left side |
88 | | - - id: VQ-06 |
89 | | - name: Axis Labels |
90 | | - score: 2 |
91 | | - max: 2 |
92 | | - passed: true |
93 | | - comment: N/A for Sankey, but all nodes labeled with descriptive names and |
94 | | - units (TWh) |
95 | | - - id: VQ-07 |
96 | | - name: Grid & Legend |
97 | | - score: 1 |
98 | | - max: 2 |
99 | | - passed: true |
100 | | - comment: No grid needed for Sankey (correct), but could benefit from a legend |
101 | | - explaining blue=sources vs yellow=end-use |
102 | | - spec_compliance: |
103 | | - score: 24 |
104 | | - max: 25 |
105 | | - items: |
106 | | - - id: SC-01 |
107 | | - name: Plot Type |
108 | | - score: 8 |
109 | | - max: 8 |
110 | | - passed: true |
111 | | - comment: Correct Sankey diagram implementation using matplotlib.sankey |
112 | | - - id: SC-02 |
113 | | - name: Data Mapping |
114 | | - score: 5 |
115 | | - max: 5 |
116 | | - passed: true |
117 | | - comment: Flows correctly show source→target with widths proportional to values |
118 | | - - id: SC-03 |
119 | | - name: Required Features |
120 | | - score: 5 |
121 | | - max: 5 |
122 | | - passed: true |
123 | | - comment: Shows multiple sources, transformation/losses stage, and multiple |
124 | | - destinations |
125 | | - - id: SC-04 |
126 | | - name: Data Range |
127 | | - score: 3 |
128 | | - max: 3 |
129 | | - passed: true |
130 | | - comment: All data visible, energy balance verified (300 = 200 + 100) |
131 | | - - id: SC-05 |
132 | | - name: Legend Accuracy |
133 | | - score: 1 |
134 | | - max: 2 |
135 | | - passed: true |
136 | | - comment: Labels are accurate but no explicit legend for color meaning |
137 | | - - id: SC-06 |
138 | | - name: Title Format |
139 | | - score: 2 |
140 | | - max: 2 |
141 | | - passed: true |
142 | | - comment: Correctly formatted as "National Energy Flow · sankey-basic · matplotlib |
143 | | - · pyplots.ai" |
144 | | - data_quality: |
145 | | - score: 19 |
146 | | - max: 20 |
147 | | - items: |
148 | | - - id: DQ-01 |
149 | | - name: Feature Coverage |
150 | | - score: 7 |
151 | | - max: 8 |
152 | | - passed: true |
153 | | - comment: Shows multiple sources, losses, and multiple destinations; demonstrates |
154 | | - flow proportionality well |
155 | | - - id: DQ-02 |
156 | | - name: Realistic Context |
157 | | - score: 7 |
158 | | - max: 7 |
159 | | - passed: true |
160 | | - comment: Energy flow is a classic Sankey application with realistic TWh values |
161 | | - - id: DQ-03 |
162 | | - name: Appropriate Scale |
163 | | - score: 5 |
164 | | - max: 5 |
165 | | - passed: true |
166 | | - comment: Values are realistic for national energy data (300 TWh total) |
167 | | - code_quality: |
168 | | - score: 9 |
169 | | - max: 10 |
170 | | - items: |
171 | | - - id: CQ-01 |
172 | | - name: KISS Structure |
173 | | - score: 3 |
174 | | - max: 3 |
175 | | - passed: true |
176 | | - comment: 'Simple linear structure: imports → data → plot → save' |
177 | | - - id: CQ-02 |
178 | | - name: Reproducibility |
179 | | - score: 2 |
180 | | - max: 3 |
181 | | - passed: true |
182 | | - comment: 'Deterministic data (no random), but no explicit seed needed; minor: |
183 | | - assert statement adds slight complexity' |
184 | | - - id: CQ-03 |
185 | | - name: Clean Imports |
186 | | - score: 2 |
187 | | - max: 2 |
188 | | - passed: true |
189 | | - comment: Only matplotlib.pyplot and matplotlib.sankey imported |
190 | | - - id: CQ-04 |
191 | | - name: No Deprecated API |
192 | | - score: 1 |
193 | | - max: 1 |
194 | | - passed: true |
195 | | - comment: Uses current matplotlib.sankey API |
196 | | - - id: CQ-05 |
197 | | - name: Output Correct |
198 | | - score: 1 |
199 | | - max: 1 |
200 | | - passed: true |
201 | | - comment: Saves as 'plot.png' with dpi=300 |
202 | | - library_features: |
203 | | - score: 3 |
204 | | - max: 5 |
205 | | - items: |
206 | | - - id: LF-01 |
207 | | - name: Uses distinctive library features |
208 | | - score: 3 |
209 | | - max: 5 |
210 | | - passed: true |
211 | | - comment: Uses matplotlib.sankey module correctly with multiple connected diagrams, |
212 | | - custom pathlengths, and orientations. Could leverage more advanced features |
213 | | - like trunk customization. |
214 | | - verdict: APPROVED |
| 20 | + strengths: [] |
| 21 | + weaknesses: [] |
0 commit comments