@@ -4,43 +4,62 @@ _If you are viewing this file on CRAN, please check the
44[ latest NEWS] ( https://grantmcdermott.com/tinyplot/NEWS.html ) on our website
55where the formatting is also better._
66
7- ## 0.2.1.99 (dev version)
7+ ## 0.3.0
8+
9+ ### New features
810
911** tinyplot** v0.3.0 is a big release with many new features, both internal and
1012user-facing. Related updates are grouped below for easier navigation.
1113
12- New plot ` type ` processing system (#222 @vincentarelbundock ):
14+ #### Revamped ` type ` logic and functional equivalents
15+
16+ _ (Primary PR and author: #222 @vincentarelbundock )_
1317
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_*() ` .
18+ - In addition to the standard character labels (` "p" ` , ` "density" ` , etc.), the
19+ ` type ` argument now supports _ functional_ equivalents (` type_points() ` ,
20+ ` type_density() ` , etc.). These new functional types all take the form
21+ ` type_*() ` .
1722- The character and functional types are interchangeable. For example,
18- ` tinyplot(Nile, type = "hist") ` and ` tinyplot(Nile, type = type_hist()) `
23+ ``` r
24+ tinyplot(Nile , type = " hist" )
25+ ```
26+ and
27+ ``` r
28+ tinyplot(Nile , type = type_hist())
29+ ```
1930 produce exactly the same result.
2031- The main advantage of the functional ` type_*() ` variants is that they offer
2132 much more flexibility and control beyond the default case(s). Users can pass
2233 appropriate arguments to existing types for customization and can even define
23- their own ` type_<typename>() ` functions.
34+ their own ` type_<typename>() ` functions. More information is available in the
35+ dedicated help page for each type (e.g., ` ?type_hist ` , ` ?type_lm ` , etc.)
2436- On the development side, overhauling the ` type ` system has also allowed us to
2537 introduce a number of new plot types and features (see list below). We have
2638 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 .)
39+ requires less guesswork on our end. Speaking of which, we now recommended that
40+ users explicitly pass ancillary type-specific arguments as part of the
41+ relevant ` type_*() ` call. For example,
42+ ``` r
43+ tinyplot(Nile , type = type_hist(breaks = 30 ))
44+ ```
45+ is preferable to
46+ ``` r
47+ tinyplot(Nile , type = " hist" , breaks = 30 )
48+ ```
49+ While the latter option will still work, we cannot guarantee that argument
50+ passing will work in every situation. (Reason: Passing ancillary type-specific
51+ arguments at the top level of the plot call only works if these do not
52+ conflict with the main arguments of the ` tinyplot() ` function itself; see
53+ #267 .)
3654- Some minor breaking changes were unavoidable; see further below.
3755- For more details on the new ` type ` system, please see the dedicated
3856 [ Plot types vignette] ( https://grantmcdermott.com/tinyplot/vignettes/types.html )
3957 on the website.
4058
41- New plot types:
59+ #### Support for additional plot types
4260
4361 - Visualizations:
62+
4463 - ` type_spineplot() ` (shortcut: ` "spineplot" ` ) spine plots and
4564 spinograms. These are modified versions of a histogram or mosaic plot,
4665 and are particularly useful for visualizing factor variables. (#233
@@ -52,11 +71,13 @@ New plot types:
5271 - ` type_rug() ` (shortcut: ` "rug" ` ) adds a rug to an existing plot. (#276
5372 @grantmcdermott )
5473 - ` type_text() ` (shortcut: ` "text" ` ) adds text annotations. (@vincentarelbundock )
74+
5575 - Models:
5676 - ` type_glm() ` (shortcut: ` "glm" ` ) (@vincentarelbundock )
5777 - ` type_lm() ` (shortcut: ` "lm" ` ) (@vincentarelbundock )
5878 - ` type_loess() ` (shortcut: ` "loess" ` ) (@vincentarelbundock )
5979 - ` type_spline() ` (shortcut: ` "spline" ` ) (#241 @grantmcdermott )
80+
6081 - Functions:
6182 - ` type_abline() ` : line(s) with intercept and slope (#249 @vincentarelbundock )
6283 - ` type_hline() ` : horizontal line(s) (#249 @vincentarelbundock )
@@ -65,7 +86,26 @@ New plot types:
6586 - ` type_summary() ` : summarize values of ` y ` along unique values of ` x ` (#274
6687 @grantmcdermott )
6788
68- Other new features:
89+ #### Themes
90+
91+ _ (Primary PR and authors: #258 @vincentarelbundock and @grantmcdermott )_
92+
93+ - The new ` tinytheme() ` function provides a convenient mechanism for styling
94+ plots according to a variety of pre-defined themes, e.g. ` tinytheme("clean") ` .
95+ - Users can also add their own custom themes or tweak an existing theme.
96+ - Themes are persistent and will affect all subsequent plots until they are
97+ explicitly reset, e.g. by calling ` tinytheme() ` (with no argument) to restore
98+ the default plot aesthetic.
99+ - Behind the scenes, ` tinytheme() ` sets a hook for a group graphical parameters
100+ by passing them through ` tpar() ` . Users can still use ` tpar() ` to style their
101+ plots manually by setting individual graphical parameters. But going forward
102+ we expect that most ** tinyplot** users will prefer the convenience of going
103+ through ` tinytheme() ` .
104+ - More details are provided in the dedicated
105+ [ Themes vignette] ( https://grantmcdermott.com/tinyplot/vignettes/themes.html )
106+ on the website.
107+
108+ #### Other new features
69109
70110- New ` tinyplot() ` arguments:
71111 - ` flip <logical> ` allows for easily flipping (swapping) the orientation
@@ -78,27 +118,16 @@ Other new features:
78118 threshold lines. (#245 @grantmcdermott )
79119 - ` facet.args ` gains a ` free = <logical> ` sub-argument for independently
80120 scaling the axes limits of individual facets. (#253 @grantmcdermott )
121+
81122- ` tpar() ` gains additional ` grid.col ` , ` grid.lty ` , and ` grid.lwd ` arguments for
82123 fine-grained control over the appearance of the default panel grid when
83124 ` tinyplot(..., grid = TRUE) ` is called. (#237 @grantmcdermott )
125+
84126- The new ` tinyplot_add() ` (alias: ` plt_add() ` ) convenience function allows
85127easy layering of plots without having to specify repeat arguments. (#246
86128@vincentarelbundock )
87- - The new ` tinytheme() ` function provides a convenient mechanism for styling
88- plots according to a variety of pre-defined themes, e.g. ` tinytheme("clean") ` .
89- Users can also add their own custom themes or tweak an existing theme. Themes
90- are persistent and will affect all subsequent plots until they are explicitly
91- reset, e.g. by calling ` tinytheme() ` (with no argument) to restore the default
92- plot aesthetic. Behind the scenes, ` tinytheme() ` sets a hook for a group
93- graphical parameters by passing them through ` tpar() ` . Users can still use
94- ` tpar() ` to style their plots by manually setting individual graphical
95- parameters. But going forward we expect that most ** tinyplot** users will prefer
96- the convenience of going through ` tinytheme() ` . More details are provided in the
97- dedicated
98- [ Themes vignette] ( https://grantmcdermott.com/tinyplot/vignettes/themes.html )
99- on the website. (#258 @vincentarelbundock and @grantmcdermott )
100129
101- Breaking changes:
130+ ### Breaking changes
102131
103132- There are a few breaking changes to grouped density plots.
104133 - The joint smoothing bandwidth is now computed using an observation-weighted
@@ -119,7 +148,7 @@ Breaking changes:
119148 entire ` palette ` , rather than just the ribbon). See our warning about passing
120149 ancillary type-specific arguments above.
121150
122- Bug fixes:
151+ ### Bug fixes
123152
124153- Better preserve facet attributes, thus avoiding misarrangement of facet grids
125154for density and histogram types. (#209 @zeileis )
@@ -139,17 +168,16 @@ way back in #2 and the eventual solution in #233.
139168enable fine-grained control over this behaviour. (#228 @eleuven and
140169@grantmcdermott )
141170
142- Internals:
171+ ### Misc
143172
144173- Continued modularization/abstraction of the code logic. (#214
145174@vincentarelbundock )
146175- Major internal refactor of the type drawing and data processing. (#222
147176@vincentarelbundock )
148-
149- Misc:
150-
151177- Documentation improvements, e.g. explicit guidance on how to specify multiple
152178grouping variables (thanks to @strengjacke for reporting #213 ).
179+ - The new functional type processing system also means that each type now
180+ has its own help page (e.g. ` ?type_hist ` , ` type_ridge ` , etc.)
153181
154182## 0.2.1
155183
0 commit comments