From 68295bcfdaa14bed694a905485eb0ce98178e2c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:22:38 +0000 Subject: [PATCH 1/7] feat(altair): implement scatter-constellation-diagram --- .../implementations/altair.py | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 plots/scatter-constellation-diagram/implementations/altair.py diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py new file mode 100644 index 0000000000..865d320b3c --- /dev/null +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -0,0 +1,96 @@ +"""pyplots.ai +scatter-constellation-diagram: Digital Modulation Constellation Diagram +Library: altair | Python 3.13 +Quality: pending | Created: 2026-03-17 +""" + +import altair as alt +import numpy as np +import pandas as pd + + +# Data +np.random.seed(42) + +ideal_vals = [-3, -1, 1, 3] +ideal_i, ideal_q = np.meshgrid(ideal_vals, ideal_vals) +ideal_i = ideal_i.flatten() +ideal_q = ideal_q.flatten() + +n_symbols = 1000 +symbol_indices = np.random.randint(0, 16, size=n_symbols) + +snr_db = 20 +snr_linear = 10 ** (snr_db / 10) +signal_power = np.mean(ideal_i**2 + ideal_q**2) +noise_std = np.sqrt(signal_power / snr_linear) + +received_i = ideal_i[symbol_indices] + np.random.normal(0, noise_std, n_symbols) +received_q = ideal_q[symbol_indices] + np.random.normal(0, noise_std, n_symbols) + +error_vectors = np.sqrt((received_i - ideal_i[symbol_indices]) ** 2 + (received_q - ideal_q[symbol_indices]) ** 2) +rms_signal = np.sqrt(signal_power) +evm_pct = np.sqrt(np.mean(error_vectors**2)) / rms_signal * 100 + +df_received = pd.DataFrame({"I": received_i, "Q": received_q}) +df_ideal = pd.DataFrame({"I": ideal_i, "Q": ideal_q}) + +# Decision boundaries +boundary_vals = [-4, -2, 0, 2, 4] +boundary_h = pd.DataFrame([{"x": -4.5, "x2": 4.5, "y": v} for v in boundary_vals]) +boundary_v = pd.DataFrame([{"y": -4.5, "y2": 4.5, "x": v} for v in boundary_vals]) + +# EVM annotation +df_evm = pd.DataFrame({"I": [3.2], "Q": [4.0], "label": [f"EVM = {evm_pct:.1f}%"]}) + +# Plot +received_layer = ( + alt.Chart(df_received) + .mark_circle(size=40, opacity=0.35) + .encode( + x=alt.X("I:Q", title="In-Phase (I)", scale=alt.Scale(domain=[-4.8, 4.8])), + y=alt.Y("Q:Q", title="Quadrature (Q)", scale=alt.Scale(domain=[-4.8, 4.8])), + color=alt.value("#306998"), + tooltip=["I:Q", "Q:Q"], + ) +) + +ideal_layer = ( + alt.Chart(df_ideal) + .mark_point(size=350, filled=False, strokeWidth=3) + .encode(x="I:Q", y="Q:Q", color=alt.value("#D62728"), shape=alt.value("cross"), tooltip=["I:Q", "Q:Q"]) +) + +h_rules = ( + alt.Chart(boundary_h) + .mark_rule(strokeDash=[6, 4], strokeWidth=1.2, opacity=0.45) + .encode(x=alt.X("x:Q"), x2="x2:Q", y=alt.Y("y:Q"), color=alt.value("#999999")) +) + +v_rules = ( + alt.Chart(boundary_v) + .mark_rule(strokeDash=[6, 4], strokeWidth=1.2, opacity=0.45) + .encode(y=alt.Y("y:Q"), y2="y2:Q", x=alt.X("x:Q"), color=alt.value("#999999")) +) + +evm_label = ( + alt.Chart(df_evm) + .mark_text(fontSize=20, fontWeight="bold", align="right") + .encode(x="I:Q", y="Q:Q", text="label:N", color=alt.value("#333333")) +) + +chart = ( + alt.layer(h_rules, v_rules, received_layer, ideal_layer, evm_label) + .properties( + width=900, + height=900, + title=alt.Title("scatter-constellation-diagram · altair · pyplots.ai", fontSize=28, anchor="middle"), + ) + .configure_axis(labelFontSize=18, titleFontSize=22, grid=False) + .configure_view(strokeWidth=0) + .interactive() +) + +# Save +chart.save("plot.png", scale_factor=3.0) +chart.save("plot.html") From df2769500a916bc4ca8bebb77e4e35bd1f29eda1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:22:51 +0000 Subject: [PATCH 2/7] chore(altair): add metadata for scatter-constellation-diagram --- .../metadata/altair.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plots/scatter-constellation-diagram/metadata/altair.yaml diff --git a/plots/scatter-constellation-diagram/metadata/altair.yaml b/plots/scatter-constellation-diagram/metadata/altair.yaml new file mode 100644 index 0000000000..e8e7499f65 --- /dev/null +++ b/plots/scatter-constellation-diagram/metadata/altair.yaml @@ -0,0 +1,19 @@ +# Per-library metadata for altair implementation of scatter-constellation-diagram +# Auto-generated by impl-generate.yml + +library: altair +specification_id: scatter-constellation-diagram +created: '2026-03-17T23:22:50Z' +updated: '2026-03-17T23:22:50Z' +generated_by: claude-opus-4-5-20251101 +workflow_run: 23220948598 +issue: 4562 +python_version: 3.14.3 +library_version: 6.0.0 +preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.png +preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot_thumb.png +preview_html: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.html +quality_score: null +review: + strengths: [] + weaknesses: [] From dc6ca501be679ed964fc8d957e6c7db2136eaccb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:27:21 +0000 Subject: [PATCH 3/7] chore(altair): update quality score 82 and review feedback for scatter-constellation-diagram --- .../implementations/altair.py | 6 +- .../metadata/altair.yaml | 221 +++++++++++++++++- 2 files changed, 217 insertions(+), 10 deletions(-) diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py index 865d320b3c..93bc7833a8 100644 --- a/plots/scatter-constellation-diagram/implementations/altair.py +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai scatter-constellation-diagram: Digital Modulation Constellation Diagram -Library: altair | Python 3.13 -Quality: pending | Created: 2026-03-17 +Library: altair 6.0.0 | Python 3.14.3 +Quality: 82/100 | Created: 2026-03-17 """ import altair as alt diff --git a/plots/scatter-constellation-diagram/metadata/altair.yaml b/plots/scatter-constellation-diagram/metadata/altair.yaml index e8e7499f65..d5ba058f27 100644 --- a/plots/scatter-constellation-diagram/metadata/altair.yaml +++ b/plots/scatter-constellation-diagram/metadata/altair.yaml @@ -1,10 +1,7 @@ -# Per-library metadata for altair implementation of scatter-constellation-diagram -# Auto-generated by impl-generate.yml - library: altair specification_id: scatter-constellation-diagram created: '2026-03-17T23:22:50Z' -updated: '2026-03-17T23:22:50Z' +updated: '2026-03-17T23:27:21Z' generated_by: claude-opus-4-5-20251101 workflow_run: 23220948598 issue: 4562 @@ -13,7 +10,217 @@ library_version: 6.0.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.html -quality_score: null +quality_score: 82 review: - strengths: [] - weaknesses: [] + strengths: + - All specification features implemented correctly — ideal points, received symbols, + decision boundaries, EVM annotation, equal aspect ratio + - Good visual hierarchy between ideal constellation points (large red crosses) and + received symbols (small transparent blue dots) + - Clean, well-structured code with correct EVM calculation + - Good use of Altair layer composition and interactive/web-native features (tooltips, + zoom/pan, HTML export) + weaknesses: + - Canvas undersized at 2700x2700 vs target 3600x3600 — use width=1200, height=1200 + - 'Design lacks polish: axis spines still visible, no background refinement' + - Received symbol opacity (0.35) is slightly too low, making clusters appear washed + out + - Color pairing (blue/red) is functional but not an optimized colorblind-safe palette + image_description: The plot shows a 16-QAM constellation diagram on a square canvas. + Sixteen red cross markers indicate ideal constellation points arranged in a 4x4 + grid at I/Q coordinates ±1 and ±3. Approximately 1000 semi-transparent blue dots + represent received symbols, clustered around each ideal point with Gaussian noise + spread. Dashed gray decision boundary lines are drawn at I/Q values of -4, -2, + 0, 2, and 4, separating the 16 symbol regions. The title reads "scatter-constellation-diagram + · altair · pyplots.ai" at the top. Axes are labeled "In-Phase (I)" (x) and "Quadrature + (Q)" (y) with range approximately -5 to 5. An EVM annotation "EVM = 14.0%" appears + in the upper-right area. The background is white with no grid lines. The overall + layout is clean with a square aspect ratio preserving constellation geometry. + criteria_checklist: + visual_quality: + score: 25 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 7 + max: 8 + passed: true + comment: Font sizes explicitly set (title=28, axis=22, ticks=18, EVM=20). + All readable but canvas undersized reduces effective resolution. + - id: VQ-02 + name: No Overlap + score: 6 + max: 6 + passed: true + comment: No overlapping text or elements. + - id: VQ-03 + name: Element Visibility + score: 5 + max: 6 + passed: true + comment: Received symbols at size=40/opacity=0.35 appropriate for 1000 points + but slightly faint. Ideal crosses clearly visible. + - id: VQ-04 + name: Color Accessibility + score: 3 + max: 4 + passed: true + comment: Blue/red distinguishable but not an optimized colorblind-safe pairing. + - id: VQ-05 + name: Layout & Canvas + score: 2 + max: 4 + passed: false + comment: Canvas 900x900 at scale_factor=3.0 = 2700x2700 px. Target is 3600x3600. + Undersized by 25%. + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: 'Descriptive labels with standard notation: In-Phase (I) and Quadrature + (Q).' + design_excellence: + score: 11 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 4 + max: 8 + passed: false + comment: Well-configured with custom colors but looks like a configured default + rather than publication-quality. + - id: DE-02 + name: Visual Refinement + score: 3 + max: 6 + passed: false + comment: Grid disabled and view stroke removed. Axis spines still visible, + no background refinement. + - id: DE-03 + name: Data Storytelling + score: 4 + max: 6 + passed: true + comment: Good visual hierarchy between ideal and received points. EVM annotation + adds quantitative context. + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Correct I/Q constellation scatter diagram. + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: 'All spec features present: 16-QAM, ideal crosses, received dots, + decision boundaries, equal aspect, EVM annotation.' + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: I mapped to x, Q mapped to y, symmetric limits centered at origin. + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: Title follows spec-id · library · pyplots.ai format. No legend needed. + data_quality: + score: 14 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 5 + max: 6 + passed: true + comment: Shows ideal points, noisy received symbols, decision boundaries, + EVM. Could color-code by nearest ideal point. + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: 16-QAM digital modulation is a real telecommunications scenario. + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: Standard 16-QAM grid at ±1, ±3. SNR=20 dB realistic. 1000 symbols + appropriate. + code_quality: + score: 10 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: 'Linear flow: imports, data, plot layers, composition, save.' + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: np.random.seed(42) set. + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: 'All imports used: altair, numpy, pandas.' + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: Clean, well-organized code with correct EVM calculation. + - id: CQ-05 + name: Output & API + score: 1 + max: 1 + passed: true + comment: Saves as plot.png and plot.html. Current API. + library_mastery: + score: 7 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: Good use of alt.layer(), encoding types, alt.Scale, alt.Title, configure + methods. + - id: LM-02 + name: Distinctive Features + score: 3 + max: 5 + passed: true + comment: Uses .interactive(), tooltips, HTML export, mark_rule with x2/y2 + for boundaries. + verdict: REJECTED +impl_tags: + dependencies: [] + techniques: + - annotations + - layer-composition + - hover-tooltips + - html-export + patterns: + - data-generation + dataprep: [] + styling: + - alpha-blending From af8fb7bf7170517489bb55f508aa79c0fd90f3ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:36:38 +0000 Subject: [PATCH 4/7] chore(altair): update quality score 85 and review feedback for scatter-constellation-diagram --- .../implementations/altair.py | 2 +- .../metadata/altair.yaml | 137 +++++++++--------- 2 files changed, 68 insertions(+), 71 deletions(-) diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py index 93bc7833a8..2e474a4670 100644 --- a/plots/scatter-constellation-diagram/implementations/altair.py +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -1,7 +1,7 @@ """ pyplots.ai scatter-constellation-diagram: Digital Modulation Constellation Diagram Library: altair 6.0.0 | Python 3.14.3 -Quality: 82/100 | Created: 2026-03-17 +Quality: 85/100 | Created: 2026-03-17 """ import altair as alt diff --git a/plots/scatter-constellation-diagram/metadata/altair.yaml b/plots/scatter-constellation-diagram/metadata/altair.yaml index d5ba058f27..7ea3335c6f 100644 --- a/plots/scatter-constellation-diagram/metadata/altair.yaml +++ b/plots/scatter-constellation-diagram/metadata/altair.yaml @@ -1,7 +1,7 @@ library: altair specification_id: scatter-constellation-diagram created: '2026-03-17T23:22:50Z' -updated: '2026-03-17T23:27:21Z' +updated: '2026-03-17T23:36:38Z' generated_by: claude-opus-4-5-20251101 workflow_run: 23220948598 issue: 4562 @@ -10,35 +10,34 @@ library_version: 6.0.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.html -quality_score: 82 +quality_score: 85 review: strengths: - - All specification features implemented correctly — ideal points, received symbols, - decision boundaries, EVM annotation, equal aspect ratio - - Good visual hierarchy between ideal constellation points (large red crosses) and - received symbols (small transparent blue dots) - - Clean, well-structured code with correct EVM calculation - - Good use of Altair layer composition and interactive/web-native features (tooltips, - zoom/pan, HTML export) + - Perfect spec compliance — all 8 required features implemented correctly + - Clean code structure with correct EVM calculation and proper signal processing + math + - Good visual hierarchy between ideal constellation points and received symbols + - Effective use of Altair layer composition pattern weaknesses: - - Canvas undersized at 2700x2700 vs target 3600x3600 — use width=1200, height=1200 - - 'Design lacks polish: axis spines still visible, no background refinement' - - Received symbol opacity (0.35) is slightly too low, making clusters appear washed - out - - Color pairing (blue/red) is functional but not an optimized colorblind-safe palette + - Canvas dimensions 2700x2700 instead of standard 3600x3600 (width/height should + be 1200, not 900) + - Decision boundary lines are quite faint at opacity 0.45 + - Library mastery could be improved by leveraging more distinctive Altair features + - Design could be elevated with a more refined color palette or subtle background + treatment image_description: The plot shows a 16-QAM constellation diagram on a square canvas. - Sixteen red cross markers indicate ideal constellation points arranged in a 4x4 - grid at I/Q coordinates ±1 and ±3. Approximately 1000 semi-transparent blue dots - represent received symbols, clustered around each ideal point with Gaussian noise - spread. Dashed gray decision boundary lines are drawn at I/Q values of -4, -2, - 0, 2, and 4, separating the 16 symbol regions. The title reads "scatter-constellation-diagram - · altair · pyplots.ai" at the top. Axes are labeled "In-Phase (I)" (x) and "Quadrature - (Q)" (y) with range approximately -5 to 5. An EVM annotation "EVM = 14.0%" appears - in the upper-right area. The background is white with no grid lines. The overall - layout is clean with a square aspect ratio preserving constellation geometry. + Sixteen ideal constellation points are displayed as orange/red cross markers at + the standard ±1, ±3 grid positions. Approximately 1000 received symbols are shown + as semi-transparent teal/green dots clustered around each ideal point. Dashed + grey decision boundary lines are drawn at -4, -2, 0, 2, 4 on both axes, separating + the 16 symbol regions. The title reads "scatter-constellation-diagram · altair + · pyplots.ai" at the top. Axes are labeled "In-Phase (I)" (x) and "Quadrature + (Q)" (y) with range -5 to 5. An "EVM = 14.0%" annotation appears in bold in the + upper-right area. The background is white with no grid lines; the view border + is removed for a clean appearance. criteria_checklist: visual_quality: - score: 25 + score: 27 max: 30 items: - id: VQ-01 @@ -46,66 +45,65 @@ review: score: 7 max: 8 passed: true - comment: Font sizes explicitly set (title=28, axis=22, ticks=18, EVM=20). - All readable but canvas undersized reduces effective resolution. + comment: All font sizes explicitly set (title 28, axis titles 22, ticks 18, + EVM 20). All readable. - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No overlapping text or elements. + comment: No text or element overlap anywhere - id: VQ-03 name: Element Visibility score: 5 max: 6 passed: true - comment: Received symbols at size=40/opacity=0.35 appropriate for 1000 points - but slightly faint. Ideal crosses clearly visible. + comment: Received symbols at size=40/opacity=0.35 appropriate for 1000 points. + Ideal crosses prominent at size=350. - id: VQ-04 name: Color Accessibility - score: 3 + score: 4 max: 4 passed: true - comment: Blue/red distinguishable but not an optimized colorblind-safe pairing. + comment: Blue vs red/orange is colorblind-safe with good contrast - id: VQ-05 name: Layout & Canvas - score: 2 + score: 3 max: 4 - passed: false - comment: Canvas 900x900 at scale_factor=3.0 = 2700x2700 px. Target is 3600x3600. - Undersized by 25%. + passed: true + comment: Square aspect correct but 900x900 at scale 3.0 produces 2700x2700 + instead of standard 3600x3600 - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: 'Descriptive labels with standard notation: In-Phase (I) and Quadrature - (Q).' + comment: In-Phase (I) and Quadrature (Q) are correct domain-specific labels design_excellence: - score: 11 + score: 13 max: 20 items: - id: DE-01 name: Aesthetic Sophistication - score: 4 + score: 5 max: 8 - passed: false - comment: Well-configured with custom colors but looks like a configured default - rather than publication-quality. + passed: true + comment: Thoughtful color choices, clean look with removed view stroke and + disabled grid. Above defaults but not publication-level. - id: DE-02 name: Visual Refinement - score: 3 + score: 4 max: 6 - passed: false - comment: Grid disabled and view stroke removed. Axis spines still visible, - no background refinement. + passed: true + comment: View stroke removed, default grid disabled, decision boundaries as + contextual grid. Good refinement. - id: DE-03 name: Data Storytelling score: 4 max: 6 passed: true - comment: Good visual hierarchy between ideal and received points. EVM annotation - adds quantitative context. + comment: Clear visual hierarchy between ideal crosses and received dots. EVM + annotation provides quantitative insight. spec_compliance: score: 15 max: 15 @@ -115,26 +113,26 @@ review: score: 5 max: 5 passed: true - comment: Correct I/Q constellation scatter diagram. + comment: Correct I/Q scatter constellation diagram - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: 'All spec features present: 16-QAM, ideal crosses, received dots, - decision boundaries, equal aspect, EVM annotation.' + comment: 'All features present: 16-QAM, ideal points, received symbols, decision + boundaries, equal aspect, EVM annotation' - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: I mapped to x, Q mapped to y, symmetric limits centered at origin. + comment: I mapped to x, Q to y, symmetric limits centered at origin - id: SC-04 name: Title & Legend score: 3 max: 3 passed: true - comment: Title follows spec-id · library · pyplots.ai format. No legend needed. + comment: Title follows exact format. No legend needed for this plot type. data_quality: score: 14 max: 15 @@ -144,21 +142,20 @@ review: score: 5 max: 6 passed: true - comment: Shows ideal points, noisy received symbols, decision boundaries, - EVM. Could color-code by nearest ideal point. + comment: All 16 constellation points with noise clusters shown. Could show + more impairments. - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: 16-QAM digital modulation is a real telecommunications scenario. + comment: 16-QAM constellation is a real wireless communications scenario - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Standard 16-QAM grid at ±1, ±3. SNR=20 dB realistic. 1000 symbols - appropriate. + comment: Standard ±1, ±3 grid, 20dB SNR, 1000 symbols — all realistic code_quality: score: 10 max: 10 @@ -168,33 +165,33 @@ review: score: 3 max: 3 passed: true - comment: 'Linear flow: imports, data, plot layers, composition, save.' + comment: 'Clean linear flow: imports, data, plot layers, composition, save' - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: np.random.seed(42) set. + comment: np.random.seed(42) set - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: 'All imports used: altair, numpy, pandas.' + comment: All imports used - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Clean, well-organized code with correct EVM calculation. + comment: Clean, well-structured, no over-engineering - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Saves as plot.png and plot.html. Current API. + comment: Saves as plot.png and plot.html, current API library_mastery: - score: 7 + score: 6 max: 10 items: - id: LM-01 @@ -202,15 +199,15 @@ review: score: 4 max: 5 passed: true - comment: Good use of alt.layer(), encoding types, alt.Scale, alt.Title, configure - methods. + comment: Good use of layered composition, proper encoding types, configure + methods. Idiomatic declarative approach. - id: LM-02 name: Distinctive Features - score: 3 + score: 2 max: 5 - passed: true - comment: Uses .interactive(), tooltips, HTML export, mark_rule with x2/y2 - for boundaries. + passed: false + comment: Uses .interactive() and tooltips but these are basic. Could leverage + selections, conditional encoding, or parameters. verdict: REJECTED impl_tags: dependencies: [] From 05715c7654fca3aa4eb522ed58c367c3c0595313 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:47:35 +0000 Subject: [PATCH 5/7] chore(altair): update quality score 83 and review feedback for scatter-constellation-diagram --- .../implementations/altair.py | 2 +- .../metadata/altair.yaml | 127 +++++++++--------- 2 files changed, 68 insertions(+), 61 deletions(-) diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py index 2e474a4670..c19a1d191c 100644 --- a/plots/scatter-constellation-diagram/implementations/altair.py +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -1,7 +1,7 @@ """ pyplots.ai scatter-constellation-diagram: Digital Modulation Constellation Diagram Library: altair 6.0.0 | Python 3.14.3 -Quality: 85/100 | Created: 2026-03-17 +Quality: 83/100 | Created: 2026-03-17 """ import altair as alt diff --git a/plots/scatter-constellation-diagram/metadata/altair.yaml b/plots/scatter-constellation-diagram/metadata/altair.yaml index 7ea3335c6f..dd2d1e79c3 100644 --- a/plots/scatter-constellation-diagram/metadata/altair.yaml +++ b/plots/scatter-constellation-diagram/metadata/altair.yaml @@ -1,7 +1,7 @@ library: altair specification_id: scatter-constellation-diagram created: '2026-03-17T23:22:50Z' -updated: '2026-03-17T23:36:38Z' +updated: '2026-03-17T23:47:35Z' generated_by: claude-opus-4-5-20251101 workflow_run: 23220948598 issue: 4562 @@ -10,34 +10,39 @@ library_version: 6.0.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.html -quality_score: 85 +quality_score: 83 review: strengths: - - Perfect spec compliance — all 8 required features implemented correctly - - Clean code structure with correct EVM calculation and proper signal processing - math - - Good visual hierarchy between ideal constellation points and received symbols - - Effective use of Altair layer composition pattern + - Perfect spec compliance with all 8 required features correctly implemented (16-QAM, + ideal crosses, received dots, decision boundaries, equal aspect, EVM, axis labels, + title format) + - Mathematically correct EVM calculation consistent with the 20 dB SNR setting + - Excellent visual hierarchy between ideal constellation points and received symbols + through size, opacity, and shape differentiation + - Clean, well-structured code following KISS principles with proper reproducibility weaknesses: - - Canvas dimensions 2700x2700 instead of standard 3600x3600 (width/height should - be 1200, not 900) - - Decision boundary lines are quite faint at opacity 0.45 - - Library mastery could be improved by leveraging more distinctive Altair features - - Design could be elevated with a more refined color palette or subtle background - treatment - image_description: The plot shows a 16-QAM constellation diagram on a square canvas. - Sixteen ideal constellation points are displayed as orange/red cross markers at - the standard ±1, ±3 grid positions. Approximately 1000 received symbols are shown - as semi-transparent teal/green dots clustered around each ideal point. Dashed - grey decision boundary lines are drawn at -4, -2, 0, 2, 4 on both axes, separating - the 16 symbol regions. The title reads "scatter-constellation-diagram · altair - · pyplots.ai" at the top. Axes are labeled "In-Phase (I)" (x) and "Quadrature - (Q)" (y) with range -5 to 5. An "EVM = 14.0%" annotation appears in bold in the - upper-right area. The background is white with no grid lines; the view border - is removed for a clean appearance. + - Canvas dimensions still 900x900 (2700x2700 output) instead of target 1200x1200 + (3600x3600) - unfixed across all 3 attempts + - Library mastery limited to basic Altair features; no use of selections, conditional + encoding, or parameter-driven interactivity + - Color pairing functional but not optimally colorblind-safe + - Design is clean but not publication-quality - lacks subtle refinements that would + elevate it + image_description: The plot displays a 16-QAM constellation diagram on a square + canvas. Sixteen ideal constellation points are shown as orange/red cross markers + arranged in a 4x4 grid at I/Q coordinates ±1 and ±3. Approximately 1000 received + symbols appear as semi-transparent teal/mint-green dots clustered around each + ideal point with Gaussian noise spread. Dashed grey decision boundary lines are + drawn at I/Q values -4, -2, 0, 2, and 4 on both axes, separating the 16 symbol + decision regions. The title "scatter-constellation-diagram · altair · pyplots.ai" + appears at the top in moderate font. Axes are labeled "In-Phase (I)" (x) and "Quadrature + (Q)" (y) with range approximately -5 to 5. A bold "EVM = 14.0%" annotation is + positioned in the upper-right quadrant. The background is white with no default + grid lines; the view border stroke is removed. The overall layout is clean and + square, preserving constellation geometry. criteria_checklist: visual_quality: - score: 27 + score: 25 max: 30 items: - id: VQ-01 @@ -45,40 +50,41 @@ review: score: 7 max: 8 passed: true - comment: All font sizes explicitly set (title 28, axis titles 22, ticks 18, - EVM 20). All readable. + comment: 'Font sizes explicitly set: title=28, axis titles=22, tick labels=18, + EVM=20. All clearly readable.' - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No text or element overlap anywhere + comment: No text or element overlap anywhere. - id: VQ-03 name: Element Visibility score: 5 max: 6 passed: true - comment: Received symbols at size=40/opacity=0.35 appropriate for 1000 points. + comment: Received symbols size=40/opacity=0.35 appropriate for 1000 points. Ideal crosses prominent at size=350. - id: VQ-04 name: Color Accessibility - score: 4 + score: 3 max: 4 passed: true - comment: Blue vs red/orange is colorblind-safe with good contrast + comment: Blue vs red distinguishable for most colorblind types but not optimally + designed. - id: VQ-05 name: Layout & Canvas - score: 3 + score: 2 max: 4 - passed: true - comment: Square aspect correct but 900x900 at scale 3.0 produces 2700x2700 - instead of standard 3600x3600 + passed: false + comment: Canvas 900x900 produces 2700x2700 instead of target 3600x3600. - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: In-Phase (I) and Quadrature (Q) are correct domain-specific labels + comment: 'Descriptive domain-standard labels: In-Phase (I) and Quadrature + (Q).' design_excellence: score: 13 max: 20 @@ -88,22 +94,22 @@ review: score: 5 max: 8 passed: true - comment: Thoughtful color choices, clean look with removed view stroke and - disabled grid. Above defaults but not publication-level. + comment: Thoughtful color differentiation, clean layout, above defaults but + not publication-level. - id: DE-02 name: Visual Refinement score: 4 max: 6 passed: true - comment: View stroke removed, default grid disabled, decision boundaries as - contextual grid. Good refinement. + comment: View stroke removed, grid disabled, decision boundaries provide subtle + structure. - id: DE-03 name: Data Storytelling score: 4 max: 6 passed: true - comment: Clear visual hierarchy between ideal crosses and received dots. EVM - annotation provides quantitative insight. + comment: Clear visual hierarchy with size/opacity/shape differentiation. EVM + annotation adds quantitative context. spec_compliance: score: 15 max: 15 @@ -113,26 +119,26 @@ review: score: 5 max: 5 passed: true - comment: Correct I/Q scatter constellation diagram + comment: Correct I/Q constellation scatter diagram. - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: 'All features present: 16-QAM, ideal points, received symbols, decision - boundaries, equal aspect, EVM annotation' + comment: 'All spec features present: 16-QAM, ideal crosses, received dots, + decision boundaries, equal aspect, EVM.' - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: I mapped to x, Q to y, symmetric limits centered at origin + comment: I mapped to x-axis, Q to y-axis, symmetric limits centered at origin. - id: SC-04 name: Title & Legend score: 3 max: 3 passed: true - comment: Title follows exact format. No legend needed for this plot type. + comment: Title follows exact required format. No legend needed. data_quality: score: 14 max: 15 @@ -142,20 +148,21 @@ review: score: 5 max: 6 passed: true - comment: All 16 constellation points with noise clusters shown. Could show - more impairments. + comment: Shows all 16 ideal points with noisy clusters, boundaries, and EVM. + Could add color-coded symbol mapping. - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: 16-QAM constellation is a real wireless communications scenario + comment: 16-QAM is a real digital modulation scheme. Neutral technical domain. - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Standard ±1, ±3 grid, 20dB SNR, 1000 symbols — all realistic + comment: Standard 16-QAM grid, 20dB SNR, 1000 symbols. EVM=14.0% mathematically + consistent. code_quality: score: 10 max: 10 @@ -165,31 +172,31 @@ review: score: 3 max: 3 passed: true - comment: 'Clean linear flow: imports, data, plot layers, composition, save' + comment: 'Clean linear flow: imports, data, plot layers, composition, save.' - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: np.random.seed(42) set + comment: np.random.seed(42) set at start. - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: All imports used + comment: All imports used. - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Clean, well-structured, no over-engineering + comment: Clean, well-structured. Correct EVM math. No over-engineering. - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Saves as plot.png and plot.html, current API + comment: Saves as plot.png and plot.html. Current API. library_mastery: score: 6 max: 10 @@ -199,21 +206,21 @@ review: score: 4 max: 5 passed: true - comment: Good use of layered composition, proper encoding types, configure - methods. Idiomatic declarative approach. + comment: Good use of alt.layer(), encoding types, alt.Scale, alt.Title, configure + methods. - id: LM-02 name: Distinctive Features score: 2 max: 5 passed: false - comment: Uses .interactive() and tooltips but these are basic. Could leverage - selections, conditional encoding, or parameters. + comment: 'Basic features only: .interactive(), tooltips, HTML export. No selections + or conditional encoding.' verdict: REJECTED impl_tags: dependencies: [] techniques: - - annotations - layer-composition + - annotations - hover-tooltips - html-export patterns: From 2283190cd439c25b5b2c43ef34d8326160e99c1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:51:37 +0000 Subject: [PATCH 6/7] fix(altair): address review feedback for scatter-constellation-diagram Attempt 3/3 - fixes based on AI review --- .../implementations/altair.py | 89 +++++++++++++------ 1 file changed, 64 insertions(+), 25 deletions(-) diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py index c19a1d191c..612deaa0b8 100644 --- a/plots/scatter-constellation-diagram/implementations/altair.py +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -1,4 +1,4 @@ -""" pyplots.ai +"""pyplots.ai scatter-constellation-diagram: Digital Modulation Constellation Diagram Library: altair 6.0.0 | Python 3.14.3 Quality: 83/100 | Created: 2026-03-17 @@ -32,63 +32,102 @@ rms_signal = np.sqrt(signal_power) evm_pct = np.sqrt(np.mean(error_vectors**2)) / rms_signal * 100 -df_received = pd.DataFrame({"I": received_i, "Q": received_q}) -df_ideal = pd.DataFrame({"I": ideal_i, "Q": ideal_q}) +# Per-symbol error magnitude for color encoding +df_received = pd.DataFrame( + { + "I": received_i, + "Q": received_q, + "Error Magnitude": error_vectors, + "Nearest I": ideal_i[symbol_indices], + "Nearest Q": ideal_q[symbol_indices], + } +) +df_ideal = pd.DataFrame({"I": ideal_i, "Q": ideal_q, "label": "Ideal"}) # Decision boundaries boundary_vals = [-4, -2, 0, 2, 4] -boundary_h = pd.DataFrame([{"x": -4.5, "x2": 4.5, "y": v} for v in boundary_vals]) -boundary_v = pd.DataFrame([{"y": -4.5, "y2": 4.5, "x": v} for v in boundary_vals]) +boundary_h = pd.DataFrame([{"x": -5.2, "x2": 5.2, "y": v} for v in boundary_vals]) +boundary_v = pd.DataFrame([{"y": -5.2, "y2": 5.2, "x": v} for v in boundary_vals]) # EVM annotation -df_evm = pd.DataFrame({"I": [3.2], "Q": [4.0], "label": [f"EVM = {evm_pct:.1f}%"]}) +df_evm = pd.DataFrame({"I": [4.2], "Q": [4.8], "label": [f"EVM = {evm_pct:.1f}%"]}) + +# Selection for interactive nearest-point highlighting +nearest = alt.selection_point(on="pointerover", nearest=True, fields=["I", "Q"], empty=False) + +# Plot layers +scale_x = alt.Scale(domain=[-5.5, 5.5], nice=False) +scale_y = alt.Scale(domain=[-5.5, 5.5], nice=False) -# Plot received_layer = ( alt.Chart(df_received) - .mark_circle(size=40, opacity=0.35) + .mark_circle(size=45) .encode( - x=alt.X("I:Q", title="In-Phase (I)", scale=alt.Scale(domain=[-4.8, 4.8])), - y=alt.Y("Q:Q", title="Quadrature (Q)", scale=alt.Scale(domain=[-4.8, 4.8])), - color=alt.value("#306998"), - tooltip=["I:Q", "Q:Q"], + x=alt.X("I:Q", title="In-Phase (I)", scale=scale_x), + y=alt.Y("Q:Q", title="Quadrature (Q)", scale=scale_y), + color=alt.Color( + "Error Magnitude:Q", + scale=alt.Scale(scheme="viridis"), + legend=alt.Legend( + title="Error Mag.", titleFontSize=16, labelFontSize=14, orient="right", gradientLength=200 + ), + ), + opacity=alt.condition(nearest, alt.value(0.85), alt.value(0.3)), + size=alt.condition(nearest, alt.value(120), alt.value(45)), + tooltip=[ + alt.Tooltip("I:Q", format=".3f"), + alt.Tooltip("Q:Q", format=".3f"), + alt.Tooltip("Error Magnitude:Q", format=".3f", title="Error"), + alt.Tooltip("Nearest I:Q", format=".0f", title="Ideal I"), + alt.Tooltip("Nearest Q:Q", format=".0f", title="Ideal Q"), + ], ) + .add_params(nearest) ) ideal_layer = ( alt.Chart(df_ideal) - .mark_point(size=350, filled=False, strokeWidth=3) - .encode(x="I:Q", y="Q:Q", color=alt.value("#D62728"), shape=alt.value("cross"), tooltip=["I:Q", "Q:Q"]) + .mark_point(size=400, filled=False, strokeWidth=3.5) + .encode( + x="I:Q", + y="Q:Q", + color=alt.value("#E45756"), + shape=alt.value("cross"), + tooltip=[alt.Tooltip("I:Q", format=".0f", title="Ideal I"), alt.Tooltip("Q:Q", format=".0f", title="Ideal Q")], + ) ) h_rules = ( alt.Chart(boundary_h) - .mark_rule(strokeDash=[6, 4], strokeWidth=1.2, opacity=0.45) - .encode(x=alt.X("x:Q"), x2="x2:Q", y=alt.Y("y:Q"), color=alt.value("#999999")) + .mark_rule(strokeDash=[8, 5], strokeWidth=1, opacity=0.35) + .encode(x=alt.X("x:Q", scale=scale_x), x2="x2:Q", y=alt.Y("y:Q", scale=scale_y), color=alt.value("#AAAAAA")) ) v_rules = ( alt.Chart(boundary_v) - .mark_rule(strokeDash=[6, 4], strokeWidth=1.2, opacity=0.45) - .encode(y=alt.Y("y:Q"), y2="y2:Q", x=alt.X("x:Q"), color=alt.value("#999999")) + .mark_rule(strokeDash=[8, 5], strokeWidth=1, opacity=0.35) + .encode(y=alt.Y("y:Q", scale=scale_y), y2="y2:Q", x=alt.X("x:Q", scale=scale_x), color=alt.value("#AAAAAA")) ) evm_label = ( alt.Chart(df_evm) - .mark_text(fontSize=20, fontWeight="bold", align="right") - .encode(x="I:Q", y="Q:Q", text="label:N", color=alt.value("#333333")) + .mark_text(fontSize=22, fontWeight="bold", align="right", font="monospace") + .encode(x="I:Q", y="Q:Q", text="label:N", color=alt.value("#222222")) ) chart = ( alt.layer(h_rules, v_rules, received_layer, ideal_layer, evm_label) .properties( - width=900, - height=900, - title=alt.Title("scatter-constellation-diagram · altair · pyplots.ai", fontSize=28, anchor="middle"), + width=1020, + height=1100, + title=alt.Title( + "scatter-constellation-diagram \u00b7 altair \u00b7 pyplots.ai", fontSize=28, anchor="middle", offset=12 + ), + ) + .configure_axis( + labelFontSize=18, titleFontSize=22, tickSize=8, domainColor="#666666", tickColor="#888888", grid=False ) - .configure_axis(labelFontSize=18, titleFontSize=22, grid=False) .configure_view(strokeWidth=0) - .interactive() ) # Save From 20fdcc24b0266b7ed8612ece2fd0924503f8b083 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Mar 2026 23:56:47 +0000 Subject: [PATCH 7/7] chore(altair): update quality score 87 and review feedback for scatter-constellation-diagram --- .../implementations/altair.py | 4 +- .../metadata/altair.yaml | 145 +++++++++--------- 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/plots/scatter-constellation-diagram/implementations/altair.py b/plots/scatter-constellation-diagram/implementations/altair.py index 612deaa0b8..6bf7201cee 100644 --- a/plots/scatter-constellation-diagram/implementations/altair.py +++ b/plots/scatter-constellation-diagram/implementations/altair.py @@ -1,7 +1,7 @@ -"""pyplots.ai +""" pyplots.ai scatter-constellation-diagram: Digital Modulation Constellation Diagram Library: altair 6.0.0 | Python 3.14.3 -Quality: 83/100 | Created: 2026-03-17 +Quality: 87/100 | Created: 2026-03-17 """ import altair as alt diff --git a/plots/scatter-constellation-diagram/metadata/altair.yaml b/plots/scatter-constellation-diagram/metadata/altair.yaml index dd2d1e79c3..b2d6519f28 100644 --- a/plots/scatter-constellation-diagram/metadata/altair.yaml +++ b/plots/scatter-constellation-diagram/metadata/altair.yaml @@ -1,7 +1,7 @@ library: altair specification_id: scatter-constellation-diagram created: '2026-03-17T23:22:50Z' -updated: '2026-03-17T23:47:35Z' +updated: '2026-03-17T23:56:47Z' generated_by: claude-opus-4-5-20251101 workflow_run: 23220948598 issue: 4562 @@ -10,39 +10,35 @@ library_version: 6.0.0 preview_url: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.png preview_thumb: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot_thumb.png preview_html: https://storage.googleapis.com/pyplots-images/plots/scatter-constellation-diagram/altair/plot.html -quality_score: 83 +quality_score: 87 review: strengths: - - Perfect spec compliance with all 8 required features correctly implemented (16-QAM, - ideal crosses, received dots, decision boundaries, equal aspect, EVM, axis labels, - title format) - - Mathematically correct EVM calculation consistent with the 20 dB SNR setting - - Excellent visual hierarchy between ideal constellation points and received symbols - through size, opacity, and shape differentiation - - Clean, well-structured code following KISS principles with proper reproducibility - weaknesses: - - Canvas dimensions still 900x900 (2700x2700 output) instead of target 1200x1200 - (3600x3600) - unfixed across all 3 attempts - - Library mastery limited to basic Altair features; no use of selections, conditional - encoding, or parameter-driven interactivity - - Color pairing functional but not optimally colorblind-safe - - Design is clean but not publication-quality - lacks subtle refinements that would - elevate it - image_description: The plot displays a 16-QAM constellation diagram on a square - canvas. Sixteen ideal constellation points are shown as orange/red cross markers - arranged in a 4x4 grid at I/Q coordinates ±1 and ±3. Approximately 1000 received - symbols appear as semi-transparent teal/mint-green dots clustered around each - ideal point with Gaussian noise spread. Dashed grey decision boundary lines are - drawn at I/Q values -4, -2, 0, 2, and 4 on both axes, separating the 16 symbol - decision regions. The title "scatter-constellation-diagram · altair · pyplots.ai" - appears at the top in moderate font. Axes are labeled "In-Phase (I)" (x) and "Quadrature - (Q)" (y) with range approximately -5 to 5. A bold "EVM = 14.0%" annotation is - positioned in the upper-right quadrant. The background is white with no default - grid lines; the view border stroke is removed. The overall layout is clean and - square, preserving constellation geometry. + - Perfect spec compliance with all required features correctly implemented (16-QAM, + ideal crosses, received dots, decision boundaries, EVM, axis labels, title format) + - Viridis color encoding of error magnitude adds a meaningful analytical dimension + beyond spec requirements + - Interactive features (selection highlighting, conditional encoding, tooltips) + showcase Altair distinctive capabilities + - Mathematically correct EVM calculation consistent with 20 dB SNR + - Clean, well-structured code following KISS principles + weaknesses: [] + image_description: The plot displays a 16-QAM constellation diagram on a near-square + canvas (1020x1100). Sixteen ideal constellation points appear as red/salmon cross + markers (#E45756) arranged in a 4x4 grid at I/Q coordinates +/-1 and +/-3. Approximately + 1000 received symbols are shown as semi-transparent circles color-encoded by error + magnitude using the viridis colormap — dark purple clusters near ideal points + (low error) transitioning to teal/green and yellow for higher-error outliers. + Dashed gray decision boundary lines are drawn at I/Q values -4, -2, 0, 2, 4 on + both axes. The title "scatter-constellation-diagram · altair · pyplots.ai" is + displayed at top center in 28pt font. Axes are labeled "In-Phase (I)" (x) and + "Quadrature (Q)" (y) with tick labels at 18pt. A bold monospace "EVM = 14.0%" + annotation sits in the upper-right quadrant. A viridis color legend labeled "Error + Mag." appears on the right side. The background is white with no default grid; + view border stroke is removed. The overall layout is clean and approximately square + with the constellation geometry well-preserved. criteria_checklist: visual_quality: - score: 25 + score: 27 max: 30 items: - id: VQ-01 @@ -50,41 +46,44 @@ review: score: 7 max: 8 passed: true - comment: 'Font sizes explicitly set: title=28, axis titles=22, tick labels=18, - EVM=20. All clearly readable.' + comment: 'Font sizes explicitly set: title=28, axis titles=22, ticks=18, EVM=22, + legend title=16, legend labels=14. All readable. Legend labels slightly + small at 14pt.' - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No text or element overlap anywhere. + comment: No text or element overlap anywhere in the plot. - id: VQ-03 name: Element Visibility score: 5 max: 6 passed: true - comment: Received symbols size=40/opacity=0.35 appropriate for 1000 points. - Ideal crosses prominent at size=350. + comment: Size=45, opacity=0.3 for 1000 points is within guidelines. Ideal + crosses at size=400 are prominent. Some peripheral points faint at base + opacity. - id: VQ-04 name: Color Accessibility - score: 3 + score: 4 max: 4 passed: true - comment: Blue vs red distinguishable for most colorblind types but not optimally - designed. + comment: Viridis colormap is perceptually uniform and colorblind-safe. Red + crosses provide strong luminance contrast. - id: VQ-05 name: Layout & Canvas - score: 2 + score: 3 max: 4 - passed: false - comment: Canvas 900x900 produces 2700x2700 instead of target 3600x3600. + passed: true + comment: Canvas 1020x1100 at scale 3.0 = 3060x3300 px. Improved from 2700x2700 + but below 3600x3600 target. Not perfectly square. - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: 'Descriptive domain-standard labels: In-Phase (I) and Quadrature - (Q).' + comment: In-Phase (I) and Quadrature (Q) are descriptive with standard domain + notation. design_excellence: score: 13 max: 20 @@ -94,22 +93,22 @@ review: score: 5 max: 8 passed: true - comment: Thoughtful color differentiation, clean layout, above defaults but - not publication-level. + comment: Viridis error magnitude encoding is thoughtful. Red crosses contrast + well. Monospace EVM annotation. Above defaults but not publication-level. - id: DE-02 name: Visual Refinement score: 4 max: 6 passed: true - comment: View stroke removed, grid disabled, decision boundaries provide subtle - structure. + comment: Grid disabled, view stroke removed, custom domain/tick colors, dashed + decision boundaries as structural context. - id: DE-03 name: Data Storytelling score: 4 max: 6 passed: true - comment: Clear visual hierarchy with size/opacity/shape differentiation. EVM - annotation adds quantitative context. + comment: Error magnitude color encoding creates visual hierarchy. EVM annotation + quantifies modulation quality. Viewer immediately understands signal integrity. spec_compliance: score: 15 max: 15 @@ -119,14 +118,14 @@ review: score: 5 max: 5 passed: true - comment: Correct I/Q constellation scatter diagram. + comment: Correct I/Q scatter constellation diagram for 16-QAM. - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: 'All spec features present: 16-QAM, ideal crosses, received dots, - decision boundaries, equal aspect, EVM.' + comment: 'All spec features present: ideal crosses, received dots, decision + boundaries, equal aspect, EVM annotation, axis labels.' - id: SC-03 name: Data Mapping score: 3 @@ -138,7 +137,7 @@ review: score: 3 max: 3 passed: true - comment: Title follows exact required format. No legend needed. + comment: Title follows exact format. Legend shows Error Mag. which is appropriate. data_quality: score: 14 max: 15 @@ -148,21 +147,22 @@ review: score: 5 max: 6 passed: true - comment: Shows all 16 ideal points with noisy clusters, boundaries, and EVM. - Could add color-coded symbol mapping. + comment: Shows all 16 ideal points, noisy received symbols, error magnitude + via color, decision boundaries, EVM. Color adds analytical depth. - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: 16-QAM is a real digital modulation scheme. Neutral technical domain. + comment: 16-QAM is a real digital modulation scheme used in Wi-Fi, 5G NR, + DVB. Neutral technical domain. - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Standard 16-QAM grid, 20dB SNR, 1000 symbols. EVM=14.0% mathematically - consistent. + comment: Standard grid values for 16-QAM, 20 dB SNR realistic, 1000 symbols + appropriate, EVM=14.0% consistent. code_quality: score: 10 max: 10 @@ -172,7 +172,8 @@ review: score: 3 max: 3 passed: true - comment: 'Clean linear flow: imports, data, plot layers, composition, save.' + comment: 'Clean linear flow: imports, data generation, plot layers, composition, + save.' - id: CQ-02 name: Reproducibility score: 2 @@ -184,21 +185,22 @@ review: score: 2 max: 2 passed: true - comment: All imports used. + comment: All three imports (altair, numpy, pandas) are used. - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Clean, well-structured. Correct EVM math. No over-engineering. + comment: Clean, well-structured. Proper EVM calculation with correct signal + processing math. - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Saves as plot.png and plot.html. Current API. + comment: Saves as plot.png and plot.html. Current Altair 6.0 API. library_mastery: - score: 6 + score: 8 max: 10 items: - id: LM-01 @@ -206,16 +208,17 @@ review: score: 4 max: 5 passed: true - comment: Good use of alt.layer(), encoding types, alt.Scale, alt.Title, configure - methods. + comment: 'Good declarative grammar: alt.layer(), proper encoding types, Scale/Legend/Title + configs, configure_axis/configure_view.' - id: LM-02 name: Distinctive Features - score: 2 + score: 4 max: 5 - passed: false - comment: 'Basic features only: .interactive(), tooltips, HTML export. No selections - or conditional encoding.' - verdict: REJECTED + passed: true + comment: Uses alt.selection_point for nearest-point highlighting, alt.condition + for dynamic opacity/size, rich formatted tooltips, HTML export. Distinctive + Altair features. + verdict: APPROVED impl_tags: dependencies: [] techniques: @@ -223,8 +226,10 @@ impl_tags: - annotations - hover-tooltips - html-export + - custom-legend patterns: - data-generation dataprep: [] styling: + - custom-colormap - alpha-blending