Skip to content

Commit 4b7265b

Browse files
committed
Add stat_smooth to static plot and update test warnings
Added back stat_smooth with linear model to the ggplot in the static_plots example app. Updated example test to allow a new RuntimeWarning related to insufficient data points for line fitting.
1 parent 76ca653 commit 4b7265b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/static_plots/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def plotnine():
7878
facet_wrap,
7979
geom_point,
8080
ggplot,
81+
stat_smooth,
8182
theme,
8283
theme_bw,
8384
)
@@ -88,6 +89,7 @@ def plotnine():
8889
return (
8990
ggplot(mtcars, aes(input.x(), input.y(), color=color_var))
9091
+ geom_point()
92+
+ stat_smooth(method="lm")
9193
+ facet_wrap("~gear")
9294
+ theme_bw(base_size=16)
9395
+ theme(legend_position="top")

tests/playwright/examples/example_apps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def get_apps(path: str) -> typing.List[str]:
8989
"FutureWarning: The default of observed=False is deprecated",
9090
# seaborn: https://github.com/mwaskom/seaborn/pull/3355
9191
"FutureWarning: use_inf_as_na option is deprecated",
92-
"pd.option_context('mode.use_inf_as_na", # continutation of line above
92+
"pd.option_context('mode.use_inf_as_na", # continutation of line above,
93+
"RuntimeWarning: invalid value encountered in dot", # some groups didn't have enough data points to create a meaningful line
9394
]
9495
app_allow_js_errors: typing.Dict[str, typing.List[str]] = {
9596
"examples/brownian": ["Failed to acquire camera feed:"],

0 commit comments

Comments
 (0)