Skip to content

Commit

Permalink
- Allow changing point size in all autoplot() functions (#231)
Browse files Browse the repository at this point in the history
* pass ellipsis to all autoplot() subfunctions

* document
  • Loading branch information
pat-s authored Dec 24, 2023
1 parent 94bb4e6 commit d4485a1
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ Config/testthat/parallel: true
Encoding: UTF-8
LazyData: true
NeedsCompilation: no
Roxygen: list(markdown = TRUE)
Roxygen: list(markdown = TRUE, r6 = TRUE)
RoxygenNote: 7.2.3
28 changes: 14 additions & 14 deletions R/autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#' @return [ggplot()] or list of ggplot2 objects.
#' @name autoplot.ResamplingSpCVBlock
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBuffer()]
#' - [autoplot.ResamplingSpCVCoords()]
#' - [autoplot.ResamplingSpCVEnv()]
Expand Down Expand Up @@ -181,7 +181,7 @@ plot.ResamplingRepeatedSpCVBlock = function(x, ...) {
#' [ResamplingRepeatedSpCVEnv].
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
#' - [autoplot.ResamplingSpCVCoords()]
Expand Down Expand Up @@ -281,7 +281,7 @@ plot.ResamplingRepeatedSpCVEnv = function(x, ...) {
#' [ResamplingRepeatedSpCVCoords].
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
#' - [autoplot.ResamplingSpCVEnv()]
Expand Down Expand Up @@ -396,7 +396,7 @@ plot.ResamplingRepeatedSpCVCoords = function(x, ...) {
#' Whether to show points not used in train or test set for the current fold.
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - Vignette [Spatiotemporal Visualization](https://mlr3spatiotempcv.mlr-org.com/articles/spatiotemp-viz.html).
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
Expand Down Expand Up @@ -456,12 +456,12 @@ autoplot.ResamplingSpCVDisc = function( # nolint
if (!is.null(fold_id)) {
### Multiplot of single folds with train and test
plot = autoplot_multi_fold_list(task, resampling_sub, sample_fold_n,
fold_id, repeats_id, plot_as_grid, show_omitted)
fold_id, repeats_id, plot_as_grid, show_omitted, ...)
return(plot)
} else {
### One plot showing all test folds
plot = autoplot_all_folds_list(task, resampling_sub, sample_fold_n,
fold_id, repeats_id)
fold_id, repeats_id, ...)
return(plot)
}
}
Expand Down Expand Up @@ -529,7 +529,7 @@ plot.ResamplingRepeatedSpCVDisc = function(x, ...) {
#' Whether to show points not used in train or test set for the current fold.
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - Vignette [Spatiotemporal Visualization](https://mlr3spatiotempcv.mlr-org.com/articles/spatiotemp-viz.html).
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
Expand Down Expand Up @@ -589,12 +589,12 @@ autoplot.ResamplingSpCVTiles = function( # nolint
if (!is.null(fold_id)) {
### Multiplot of single folds with train and test
plot = autoplot_multi_fold_list(task, resampling_sub, sample_fold_n,
fold_id, repeats_id, plot_as_grid, show_omitted)
fold_id, repeats_id, plot_as_grid, show_omitted, ...)
return(plot)
} else {
### One plot showing all test folds
plot = autoplot_all_folds_list(task, resampling_sub, sample_fold_n,
fold_id, repeats_id)
fold_id, repeats_id, ...)
return(plot)
}
}
Expand Down Expand Up @@ -658,7 +658,7 @@ plot.ResamplingRepeatedSpCVTiles = function(x, ...) {
#' Whether to show points not used in train or test set for the current fold.
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVCoords()]
#' - [autoplot.ResamplingSpCVEnv()]
Expand Down Expand Up @@ -710,7 +710,7 @@ autoplot.ResamplingSpCVBuffer = function( # nolint
# Multiplot of single folds with train and test
plot = autoplot_multi_fold_list(task, resampling_sub,
sample_fold_n = NULL, show_omitted = show_omitted,
fold_id, repeats_id = 1)
fold_id, repeats_id = 1, ...)
return(plot)
}

Expand Down Expand Up @@ -752,7 +752,7 @@ plot.ResamplingSpCVBuffer = function(x, ...) {
#'
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - Vignette [Spatiotemporal Visualization](https://mlr3spatiotempcv.mlr-org.com/articles/spatiotemp-viz.html).
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
Expand Down Expand Up @@ -882,7 +882,7 @@ plot.ResamplingRepeatedSpCVKnndm = function(x, ...) {
#' @inheritParams autoplot.ResamplingSpCVBlock
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
#' - [autoplot.ResamplingSpCVCoords()]
Expand Down Expand Up @@ -966,7 +966,7 @@ autoplot.ResamplingRepeatedCV = function( # nolint
#' @inheritParams autoplot.ResamplingSpCVBlock
#' @export
#' @seealso
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/chapters/chapter13/beyond_regression_and_classification.html#spatiotemp-cv)
#' - mlr3book chapter on ["Spatiotemporal Visualization"](https://mlr3book.mlr-org.com/special.html#vis-spt-partitions)
#' - [autoplot.ResamplingSpCVBlock()]
#' - [autoplot.ResamplingSpCVBuffer()]
#' - [autoplot.ResamplingSpCVCoords()]
Expand Down
2 changes: 1 addition & 1 deletion man/autoplot.ResamplingCV.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingCustomCV.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVBlock.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVBuffer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVCoords.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVDisc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVEnv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVKnndm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSpCVTiles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d4485a1

Please sign in to comment.