View source: R/layout-chain-circle-.R
circle_layout | R Documentation |
If limits
is provided, a continuous variable will be required and aligned
in the direction specified (circle_continuous
). Otherwise, a discrete
variable will be required and aligned (circle_discrete
).
circle_layout(
data = NULL,
...,
radial = NULL,
direction = "outward",
sector_spacing = NULL,
limits = waiver(),
theme = NULL,
spacing_theta = deprecated()
)
circle_discrete(
data = NULL,
...,
radial = NULL,
direction = "outward",
sector_spacing = NULL,
theme = NULL,
spacing_theta = deprecated()
)
circle_continuous(
data = NULL,
...,
radial = NULL,
direction = "outward",
sector_spacing = NULL,
limits = NULL,
theme = NULL,
spacing_theta = deprecated()
)
data |
Default dataset to use for the layout. If not specified, it must be supplied in each plot added to the layout:
|
... |
Additional arguments passed to |
radial |
A |
direction |
A single string of
|
sector_spacing |
The size of spacing between different panel. A numeric
of the radians or a |
limits |
A |
theme |
A |
spacing_theta |
A CircleLayout
object.
set.seed(123)
small_mat <- matrix(rnorm(56), nrow = 7)
rownames(small_mat) <- paste0("row", seq_len(nrow(small_mat)))
colnames(small_mat) <- paste0("column", seq_len(ncol(small_mat)))
# circle_layout
# same for circle_discrete()
circle_layout(small_mat) +
ggalign() +
geom_tile(aes(y = .column_index, fill = value)) +
scale_fill_viridis_c() +
align_dendro(aes(color = branch), k = 3L) +
scale_color_brewer(palette = "Dark2")
# same for circle_continuous()
circle_layout(mpg, limits = continuous_limits(c(3, 5))) +
ggalign(mapping = aes(displ, hwy, colour = class)) +
geom_point(size = 2) +
ggalign(mapping = aes(displ, hwy, colour = class)) +
geom_point(size = 2) &
scale_color_brewer(palette = "Dark2") &
theme_bw()
# circle_discrete()
# direction outward
circle_discrete(small_mat) +
align_dendro(aes(color = branch), k = 3L) +
scale_color_brewer(palette = "Dark2") +
ggalign() +
geom_tile(aes(y = .column_index, fill = value)) +
scale_fill_viridis_c()
# direction inward
circle_discrete(small_mat, direction = "inward") +
ggalign() +
geom_tile(aes(y = .column_index, fill = value)) +
scale_fill_viridis_c() +
align_dendro(aes(color = branch), k = 3L) +
scale_color_brewer(palette = "Dark2")
# circle_continuous()
circle_continuous(mpg, limits = continuous_limits(c(3, 5))) +
ggalign(mapping = aes(displ, hwy, colour = class)) +
geom_point(size = 2) +
ggalign(mapping = aes(displ, hwy, colour = class)) +
geom_point(size = 2) &
scale_color_brewer(palette = "Dark2") &
theme_bw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.