-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
#' @rdname tm_raster | ||
#' @name opt_tm_rgb | ||
#' @export | ||
opt_tm_rgb = function(interpolate = TRUE) { | ||
list(trans.args = list(), | ||
mapping.args = list(interpolate = interpolate)) | ||
} | ||
|
||
#' Map layer: RGB | ||
#' | ||
#' @param col,col.scale,col.legend,col.chart,col.free Visual variable that determines | ||
#' the col color. | ||
#' @param options options passed on to the corresponding `opt_<layer_function>` function | ||
#' @export | ||
tm_rgb = function(col = tm_mv(1:3), | ||
col.scale = tm_scale_rgb(), | ||
col.legend = tm_legend(), | ||
col.chart = tm_chart_none(), | ||
col.free = NA) { | ||
do.call(tm_raster, args = list(col = col, col.scale = col.scale, col.legend = col.legend, col.chart = col.chart, col.free = col.free)) | ||
col.free = NA, | ||
options = opt_tm_rgb()) { | ||
do.call(tm_raster, args = list(col = col, col.scale = col.scale, col.legend = col.legend, col.chart = col.chart, col.free = col.free, options = options)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.