-
Notifications
You must be signed in to change notification settings - Fork 0
update(area-basic): letsplot — comprehensive quality review #4179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
262c795
d5235c8
ac52ca6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||||||
| """ pyplots.ai | ||||||||||||||
| area-basic: Basic Area Chart | ||||||||||||||
| Library: letsplot 4.8.1 | Python 3.13.11 | ||||||||||||||
| Quality: 91/100 | Created: 2025-12-23 | ||||||||||||||
| Library: letsplot 4.8.2 | Python 3.14.2 | ||||||||||||||
| Quality: 95/100 | Created: 2025-12-23 | ||||||||||||||
| """ | ||||||||||||||
|
|
||||||||||||||
| import numpy as np | ||||||||||||||
|
|
@@ -23,23 +23,31 @@ | |||||||||||||
| visitors = np.clip(visitors, 2000, None).astype(int) | ||||||||||||||
|
|
||||||||||||||
| df = pd.DataFrame({"date": days, "visitors": visitors}) | ||||||||||||||
| df["day_num"] = np.arange(1, len(df) + 1) | ||||||||||||||
|
|
||||||||||||||
| # Plot | ||||||||||||||
| plot = ( | ||||||||||||||
| ggplot(df, aes(x="day_num", y="visitors")) # noqa: F405 | ||||||||||||||
| + geom_area(fill="#306998", alpha=0.4) # noqa: F405 | ||||||||||||||
| ggplot(df, aes(x="date", y="visitors")) # noqa: F405 | ||||||||||||||
| + geom_area( # noqa: F405 | ||||||||||||||
| fill="#306998", | ||||||||||||||
| alpha=0.4, | ||||||||||||||
| tooltips=layer_tooltips() # noqa: F405 | ||||||||||||||
| .line("@visitors visitors") | ||||||||||||||
| .format("date", "%b %d, %Y") | ||||||||||||||
| .line("@date"), | ||||||||||||||
|
Comment on lines
+34
to
+36
|
||||||||||||||
| .line("@visitors visitors") | |
| .format("date", "%b %d, %Y") | |
| .line("@date"), | |
| .line("Visitors|@visitors") | |
| .format("date", "%b %d, %Y") | |
| .line("Date|@date"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring opening should have a space after the triple quotes. The established pattern in the codebase is
""" pyplots.ai(with space), not"""pyplots.ai(without space). This is inconsistent with other plot implementations.