tile_plot {ezplot} | R Documentation |
tile_plot
Description
Creates tile plots.
Usage
tile_plot(
data,
x,
y,
z = c(Count = "1"),
facet_x = NULL,
facet_y = NULL,
size = 11,
facet_ncol = NULL,
labels_x = NULL,
labels_y = NULL,
labels_z = ez_labels,
zlim = function(x) c(pmin(0, x[1]), pmax(0, x[2])),
palette = ez_jet,
reorder = c("facet_x", "facet_y")
)
Arguments
data |
A data.frame. |
x |
A named character value. Evaluates to a column. |
y |
A named character value. Evaluates to a column. |
z |
A named character. Evaluates to a column and is mapped to the fill colour of the tiles. |
facet_x |
A character value. Evaluates to a column. |
facet_y |
A character. Evaluates to a column. |
size |
theme size for |
facet_ncol |
Option passed to ncol argument in |
labels_x |
label formatting function |
labels_y |
label formatting function |
labels_z |
label formatting function |
zlim |
argument for |
palette |
Colour function. |
reorder |
A character vector specifying the group variables to reorder.
Default is |
Examples
## Not run:
library(tsibbledata)
library(dplyr)
nyc_bikes %>%
mutate(duration = as.numeric(stop_time - start_time)) %>%
filter(between(duration, 0, 16)) %>%
tile_plot(c("Hour of Day" = "lubridate::hour(start_time) + 0.5"),
c("Ride Duration (min)" = "duration - duration %% 2 + 1"))
## End(Not run)
[Package ezplot version 0.7.13 Index]