@@ -7,43 +7,34 @@ where the formatting is also better._
77## 0.2.1.99 (dev version)
88
99** tinyplot** v0.3.0 is a big release with many new features, both internal and
10- user-facing. Below we have tried to group alike news items together, starting
11- with the new plot type processing system.
12-
13- New plot ` type ` processing system:
14-
15- - In previous versions of ` tinyplot ` the plot ` type ` was specified by character
16- arguments, i.e., either the standard character shortcuts (such ` "p" ` , ` "l" ` ,
17- etc.) or labels (such as ` "hist" ` , ` "boxplot" ` , etc.). In addition, the
18- ` type ` argument now accepts functional ` type_*() ` equivalents (e.g.,
19- ` type_hist() ` ) which enable a variety of additional features, as well as a
20- more disciplined approach to explicit argument passing for customized type
21- behavior. (#222 @vincentarelbundock )
22- - All plot types provided in the package can be specified either by a character
23- label or the corresponding function. Thus, the following two are equivalent:
24- ` tinyplot(Nile, type = "hist") ` and ` tinyplot(Nile, type = type_hist()) ` .
25- - The main advantage of the function specification is that many more plot types
26- can be supported (see list below) and users can define their own custom types
27- by creating ` type_<typename>() ` functions.
28- - Enabling these new features comes at the cost of a different approach for
29- specifying ancilliary arguments of the type function. It is recommended to
30- pass such arguments explicitly to the ` type_*() ` function call, e.g., as in
31- ` tinyplot(Nile, type = type_hist(breaks = 30)) ` . In many situations it is
32- still possible to use the character specification plus extra arguments
33- instead, e.g., as in ` tinyplot(Nile, type = "hist", breaks = 30) ` . However,
34- this only works if the ancilliary type arguments do not match or even
35- partially match any of the arguments of the ` tinyplot() ` function itself.
36- This is why the former approach is recommended (unless using only the
37- default type).
38- - Due to this change in the processing of the ancilliary type arguments there
39- are a few breaking changes but we have tried to minimize them. One argument
40- that was deprecated explicitly is ` ribbon.alpha ` in ` tinyplot() ` . Use the
41- ` alpha ` argument of the ` type_ribbon() ` function instead:
42- ` tinyplot(..., type = type_ribbon(alpha = 0.5)) ` . Note that it is not
43- equivalent to use ` tinyplot(..., type = "ribbon", alpha = 0.5) ` because the
44- latter matches the ` alpha ` argument of ` tinyplot() ` (rather than of
45- ` type_ribbon() ` ) and modifies the ` palette ` rather than the ribbon only.
46- - More details are provided in the dedicated
10+ user-facing. Related updates are grouped below for easier navigation.
11+
12+ New plot ` type ` processing system (#222 @vincentarelbundock ):
13+
14+ - In addition to the standard character labels (e.g., ` "p" ` , ` "density" ` ), the
15+ ` type ` argument now supports _ functional_ equivalents (e.g., ` type_points() ` ,
16+ ` type_density() ` . These new functional types all take the form ` type_*() ` .
17+ - The character and functional types are interchangeable. For example,
18+ ` tinyplot(Nile, type = "hist") ` and ` tinyplot(Nile, type = type_hist()) `
19+ produce exactly the same result.
20+ - The main advantage of the functional ` type_*() ` variants is that they offer
21+ much more flexibility and control beyond the default case(s). Users can pass
22+ appropriate arguments to existing types for customization and can even define
23+ their own ` type_<typename>() ` functions.
24+ - On the development side, overhauling the ` type ` system has also allowed us to
25+ introduce a number of new plot types and features (see list below). We have
26+ also simplified our internal codebase, since explicit argument passing
27+ requires less guesswork on our end.
28+ - Speaking of which, we now recommended that users explicitly pass ancillary
29+ type-specific arguments as part of the relevant ` type_*() ` call. For example:
30+ ` tinyplot(Nile, type = type_hist(breaks = 30)) ` is preferable to
31+ ` tinyplot(Nile, type = "hist", breaks = 30) ` . While the latter option will
32+ still work in this particular case, we cannot guarantee that it will for other
33+ cases. (Reason: Passing ancillary type-specific arguments at the top level of
34+ the plot call only works if these do not conflict with the main arguments of
35+ the ` tinyplot() ` function itself; see #267 .)
36+ - Some minor breaking changes were unavoidable; see further below.
37+ - For more details on the new ` type ` system, please see the dedicated
4738 [ Plot types vignette] ( https://grantmcdermott.com/tinyplot/vignettes/types.html )
4839 on the website.
4940
@@ -107,6 +98,27 @@ dedicated
10798[ Themes vignette] ( https://grantmcdermott.com/tinyplot/vignettes/themes.html )
10899on the website. (#258 @vincentarelbundock and @grantmcdermott )
109100
101+ Breaking changes:
102+
103+ - There are a few breaking changes to grouped density plots. (#284 @grantmcdermott )
104+ - The default smoothing bandwidth is now computed independently for each data
105+ subgroup, rather than being computed from the joint density. Users can still
106+ opt into using a joint bandwidth by invoking the
107+ ` type_density(joint.bw = <option>) ` argument. See the function documentation
108+ for details.
109+ - Grouped and/or faceted plots are no longer possible on density objects
110+ (i.e., via the ` tinyplot.density() ` method). Instead, please rather call
111+ ` tinyplot(..., type = "density") ` or ` tinyplot(..., type = type_density()) `
112+ on the raw data and pass grouping or facet arguments as needed.
113+ - The ` ribbon.alpha ` argument in ` tinyplot() ` has been deprecated. Use the
114+ ` alpha ` argument in ` type_ribbon() ` (and equivalents) instead: e.g.,
115+ ` tinyplot(..., type = type_ribbon(alpha = 0.5)) ` .
116+ - Aside: Please note that this is _ not_ equivalent to using
117+ ` tinyplot(..., type = "ribbon", alpha = 0.5) ` because the latter matches the
118+ top-level ` alpha ` argument of ` tinyplot() ` itself (and thus modifies the
119+ entire ` palette ` , rather than just the ribbon). See our warning about passing
120+ ancillary type-specific arguments above.
121+
110122Bug fixes:
111123
112124- Better preserve facet attributes, thus avoiding misarrangement of facet grids
0 commit comments