Skip to content

feat: add area-basic implementation (9 libraries)#527

Merged
MarkusNeusinger merged 3 commits intomainfrom
plot/area-basic
Dec 7, 2025
Merged

feat: add area-basic implementation (9 libraries)#527
MarkusNeusinger merged 3 commits intomainfrom
plot/area-basic

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

Summary

Adds area-basic plot implementation.

Libraries

  • Merged: 9 (all libraries)
  • Not Feasible: 0

Links

Closes #514


🤖 Auto-generated by pyplots CI

claude bot and others added 3 commits December 7, 2025 21:30
## Summary
Implements `area-basic` for **altair** library.

**Parent Issue:** #514
**Sub-Issue:** #519
**Base Branch:** `plot/area-basic`
**Attempt:** 1/3

## Implementation
- `plots/altair/area/area-basic/default.py`

### Changes from initial template:
- Used spec example data with proper month names (Jan-Dec) as ordinal
values
- Adjusted opacity to 0.7 for better visual clarity
- Added `sort=None` to preserve month order
- Configured proper axis labels and font sizes per style guide

Closes #519

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
## Summary
Implements `area-basic` for **highcharts** library.

**Parent Issue:** #514
**Sub-Issue:** #522
**Base Branch:** `plot/area-basic`
**Attempt:** 1/3

## Implementation
- `plots/highcharts/area/area-basic/default.py`

### Features
- Basic area chart showing monthly sales data
- Uses Python Blue (#306998) with 0.6 fill opacity
- Includes title, axis labels with appropriate font sizes
- Data markers enabled for each point
- Exports to 4800x2700 PNG via headless Chrome

Closes #522

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
## Summary
Implements `area-basic` for **matplotlib** library.

**Parent Issue:** #514
**Sub-Issue:** #515
**Base Branch:** `plot/area-basic`
**Attempt:** 1/3

## Implementation
- `plots/matplotlib/fill_between/area-basic/default.py`

The implementation uses `fill_between` to create a filled area chart
with:
- Monthly sales data as specified in the spec
- Python Blue (#306998) color from the style guide
- Proper axis labels and title matching spec name
- Y-axis starting from 0 for accurate area representation
- Grid with subtle styling

Closes #515

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 7, 2025 21:38
@MarkusNeusinger MarkusNeusinger merged commit 6554ebe into main Dec 7, 2025
7 of 9 checks passed
@MarkusNeusinger MarkusNeusinger deleted the plot/area-basic branch December 7, 2025 21:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 7, 2025

✅ Plot Tests Passed

Python 3.13 (required): passed

Compatibility: 3.12 3.13

Note: Only Python 3.13 is required to pass. Python 3.12 is tested for compatibility.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the area-basic plot implementation across all 9 supported plotting libraries. The implementation follows the spec defined in specs/area-basic.md, which visualizes monthly sales data as a filled area chart. The changes shown in this PR are updates to three library implementations (matplotlib, highcharts, and altair) to improve consistency and code quality.

Key Changes:

  • Standardizes data values across implementations to match the spec (12 months of sales data)
  • Updates matplotlib title from "Monthly Sales Volume" to "Basic Area Chart" for consistency with the spec
  • Refactors highcharts implementation with cleaner code structure and simplified configuration
  • Improves altair implementation by using proper ordinal encoding for categorical month data

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
plots/matplotlib/fill_between/area-basic/default.py Updated title to "Basic Area Chart" to match spec title
plots/highcharts/area/area-basic/default.py Refactored with code cleanup, simplified configuration, and corrected window sizing
plots/altair/area/area-basic/default.py Changed month encoding from quantitative to ordinal (correct for categorical data)

y=alt.Y("sales:Q", title="Sales", axis=alt.Axis(labelFontSize=16, titleFontSize=20)),
)
.properties(width=1600, height=900, title=alt.TitleParams(text="Basic Area Chart", fontSize=20))
.properties(width=1600, height=900, title=alt.TitleParams(text="Monthly Sales", fontSize=20))
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The title is being changed from "Basic Area Chart" to "Monthly Sales", which creates inconsistency with other implementations. The matplotlib implementation in this same PR is being updated to use "Basic Area Chart", and several other libraries (letsplot, seaborn) also use "Basic Area Chart". Consider keeping "Basic Area Chart" for consistency across all library implementations.

Suggested change
.properties(width=1600, height=900, title=alt.TitleParams(text="Monthly Sales", fontSize=20))
.properties(width=1600, height=900, title=alt.TitleParams(text="Basic Area Chart", fontSize=20))

Copilot uses AI. Check for mistakes.

# Title
chart.options.title = {"text": "Monthly Sales Trend", "style": {"fontSize": "48px"}}
chart.options.title = {"text": "Monthly Sales", "style": {"fontSize": "48px"}}
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The title "Monthly Sales" creates inconsistency with other implementations. The matplotlib implementation in this same PR is being updated to use "Basic Area Chart", and several other libraries (letsplot, seaborn) also use "Basic Area Chart". Consider using "Basic Area Chart" for consistency across all library implementations.

Suggested change
chart.options.title = {"text": "Monthly Sales", "style": {"fontSize": "48px"}}
chart.options.title = {"text": "Basic Area Chart", "style": {"fontSize": "48px"}}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[area-basic] [update] Test automatic issue closing

2 participants