You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plot displays a stacked histogram showing test score distributions for three study methods. The X-axis shows "Test Score (points)" ranging from 40 to 100, and the Y-axis shows "Number of Students" ranging from 0 to 80. Three groups are stacked: Traditional Study (blue, #306998), Active Recall (yellow, #FFD43B), and Passive Reading (orange, #E67E22). The stacking clearly shows individual group contributions with total bar heights representing combined frequencies. The title "histogram-stacked · altair · pyplots.ai" appears at the top. A legend on the right identifies each study method. The grid uses subtle dashed lines with low opacity.
Quality Score: 92/100
Criteria Checklist
Visual Quality (36/40 pts)
VQ-01: Text Legibility (10/10) - Title at 28pt, axis labels at 22pt, tick labels at 18pt - all perfectly readable
VQ-02: No Overlap (8/8) - No overlapping text elements anywhere
VQ-03: Element Visibility (8/8) - Bars are well-sized with good opacity (0.85), white stroke separates segments nicely
VQ-04: Color Accessibility (4/5) - Blue, yellow, orange palette is colorblind-friendly (no red-green issues), though could be slightly more distinct
VQ-05: Layout Balance (4/5) - Good use of canvas space, plot fills ~60% of canvas, balanced margins
VQ-06: Axis Labels (2/2) - Descriptive with units: "Test Score (points)", "Number of Students"
VQ-07: Grid & Legend (0/2) - Grid is subtle (alpha 0.3, dashed), but legend title font could better match overall styling
Spec Compliance (25/25 pts)
SC-01: Plot Type (8/8) - Correct stacked histogram implementation
SC-02: Data Mapping (5/5) - Continuous variable (Score) binned on X, count on Y, category for color
SC-03: Required Features (5/5) - All spec features present: stacking, distinct colors, legend with group labels
SC-04: Data Range (3/3) - All data visible, appropriate bin boundaries (40-100)
SC-05: Legend Accuracy (2/2) - Legend labels match data groups correctly
SC-06: Title Format (2/2) - Correct format: "histogram-stacked · altair · pyplots.ai"
Data Quality (18/20 pts)
DQ-01: Feature Coverage (7/8) - Shows three distinct distributions with different means and spreads, demonstrates stacking well
DQ-02: Realistic Context (7/7) - Educational test scores with study methods is a neutral, relatable scenario
DQ-03: Appropriate Scale (4/5) - Test scores 0-100 are realistic; distributions centered around 68-78 are plausible
Code Quality (10/10 pts)
CQ-01: KISS Structure (3/3) - Clean imports → data → plot → save structure, no functions/classes
CQ-04: No Deprecated API (1/1) - Uses current Altair API
CQ-05: Output Correct (1/1) - Saves as plot.png and plot.html
Library Features (3/5 pts)
LF-01: Uses distinctive library features (3/5) - Good use of declarative encoding with alt.X, alt.Y, alt.Color, binning, and stack configuration, but could leverage more Altair-specific features like tooltips or selection
Strengths
Excellent declarative encoding with proper use of Altair grammar (alt.X with bin, alt.Y with stack="zero", alt.Color with custom scale)
Clean, readable code following KISS principles with good data generation
Proper font sizing throughout (title 28pt, axis titles 22pt, labels 18pt, legend 16-18pt)
Good color palette choice (blue, yellow, orange) that avoids colorblind issues
White stroke between bar segments (strokeWidth=0.5) enhances visual separation
Appropriate use of scale_factor=3.0 for high-resolution output
Both PNG and HTML outputs generated for static and interactive viewing
Weaknesses
Legend styling could be more polished (title and label fonts could be slightly larger for better visual hierarchy)
Could add tooltips for interactive exploration showing exact counts per bin
The order parameter could be more intentionally designed to show a specific visual story (e.g., ordering by mean score)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation:
histogram-stacked- altairImplements the altair version of
histogram-stacked.File:
plots/histogram-stacked/implementations/altair.py🤖 impl-generate workflow