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
BUG: Inherit DEFAULT_PARAMS down the geom and stat class hierarchy
Subclasses now declare only the parameters that differ from their
parent, and the effective merged set is exposed as `default_params`.
This fixes geoms rejecting parameters that their parent geom
supports: geom_step now accepts lineend, linejoin and arrow,
geom_quantile accepts arrow, and geom_histogram accepts just and
width. geom_step also renders its corners with the documented
round joinstyle, hence the updated baseline images.
Copy file name to clipboardExpand all lines: doc/changelog.qmd
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -66,14 +66,21 @@ title: Changelog
66
66
layer(geom=geom_point())
67
67
```
68
68
69
-
-`geom.DEFAULT_PARAMS` now implicitly includes `stat="identity"`, `position="identity`
70
-
and `na_rm=False`.
71
-
72
-
-`stat.DEFAULT_PARAMS` now implicitly includes `geom="blank"`, `position="identity`
73
-
and `na_rm=False`.
69
+
-`DEFAULT_PARAMS` declarations are now inherited down the class hierarchy;
70
+
a subclass geom or stat only declares the parameters that differ from its
71
+
parent. The base `geom` class declares `stat="identity"`,
72
+
`position="identity"` and `na_rm=False`, and the base `stat` class declares
73
+
`geom="blank"`, `position="identity"` and `na_rm=False`, so all geoms and
74
+
stats include them automatically.
74
75
75
76
### Bug Fixes
76
77
78
+
- Subclass geoms now inherit their parent geom's default parameters, so
79
+
parameters that a parent geom supports are no longer rejected.
80
+
[](:class:`~plotnine.geom_step`) accepts `lineend`, `linejoin` and `arrow`,
81
+
[](:class:`~plotnine.geom_quantile`) accepts `arrow`, and
82
+
[](:class:`~plotnine.geom_histogram`) accepts `just` and `width`.
83
+
77
84
- Fixed [](:class:`~plotnine.geom_smooth`) / [](:class:`~plotnine.stat_smooth`) when using a linear model via "lm" with weights for the model to do a weighted regression. This bug did not affect the formula API of the linear model. ({{< issue 1005 >}})
0 commit comments