View source: R/ggplot-geom-rect3d.R
geom_rect3d | R Documentation |
Add z-aesthetic for geom_tile
geom_rect3d(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
lineend = "butt",
linejoin = "round",
linemitre = 10,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
geom_tile3d(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
lineend = "butt",
linejoin = "round",
linemitre = 10,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed on to
|
lineend |
Line end style (round, butt, square). |
linejoin |
Line join style (round, mitre, bevel). |
linemitre |
Line mitre limit (number greater than 1). |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
z
: the third dimention (in the z direction), use
scale_z_continuous()
to control the ranges.
theta
: Angle between x-axis and z-axis.
geom_rect3d()
understands the following aesthetics (required aesthetics are in bold):
xmin
xmax
ymin
ymax
z
alpha
colour
fill
group
linetype
linewidth
Learn more about setting these aesthetics in vignette("ggplot2-specs", package = "ggplot2")
.
geom_tile3d()
understands the following aesthetics (required aesthetics are in bold):
x
y
z
alpha
colour
fill
group
height
linetype
linewidth
width
Learn more about setting these aesthetics in vignette("ggplot2-specs", package = "ggplot2")
.
set.seed(123)
small_mat <- matrix(rnorm(81), nrow = 9)
rownames(small_mat) <- paste0("row", seq_len(nrow(small_mat)))
colnames(small_mat) <- paste0("column", seq_len(ncol(small_mat)))
ggheatmap(small_mat,
filling = FALSE,
theme = theme(
legend.box.spacing = unit(10, "mm"),
plot.margin = margin(t = 15, unit = "mm")
)
) +
geom_tile3d(
aes(fill = value, z = value, width = 0.8, height = 0.8),
color = "black"
) +
scale_fill_viridis_c(
option = "plasma",
breaks = scales::breaks_pretty(3L)
) +
coord_cartesian(clip = "off")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.