跳到正文
0.16.6 文档

本页完整说明已译为现代汉语;函数、参数、代码和原始数据标识保留原样。 使用教程

全站目录 · 按任务查找

对 ggplot2::guide_legend() 和 ggplot2::guide_colourbar() 的轻量封装,采用适合弦图的紧凑默认值,仍支持所有普通 ggplot2 图例参数。

用法

代码
guide_ggchord_legend(
  title = ggplot2::waiver(),
  theme = NULL,
  position = NULL,
  direction = NULL,
  override.aes = list(),
  nrow = NULL,
  ncol = NULL,
  reverse = FALSE,
  order = 0,
  size_scale = 1,
  ...
)

guide_ggchord_colourbar(
  title = ggplot2::waiver(),
  theme = NULL,
  nbin = NULL,
  display = "raster",
  alpha = NA,
  draw.ulim = TRUE,
  draw.llim = TRUE,
  angle = NULL,
  position = NULL,
  direction = NULL,
  reverse = FALSE,
  order = 0,
  available_aes = c("colour", "color", "fill", "ribbon_fill", "gene_fill",
    "feature_fill", "region_fill"),
  size_scale = 1,
  ...
)

guide_ggchord_colorbar(
  title = ggplot2::waiver(),
  theme = NULL,
  nbin = NULL,
  display = "raster",
  alpha = NA,
  draw.ulim = TRUE,
  draw.llim = TRUE,
  angle = NULL,
  position = NULL,
  direction = NULL,
  reverse = FALSE,
  order = 0,
  available_aes = c("colour", "color", "fill", "ribbon_fill", "gene_fill",
    "feature_fill", "region_fill"),
  size_scale = 1,
  ...
)

参数

title

图例标题。

theme

可选图例专属主题。

position, direction

图例位置和方向。

override.aes

覆盖图例键 aesthetic 的列表。

nrow, ncol

图例键排列的行列数。

reverse

是否反转图例键顺序。

order

图例顺序。

size_scale

图例键、间距及文字的正缩放系数。自动图例由当前导出设备推导,直接调用默认 1。

...

传给对应 ggplot2 图例的其他参数。

nbin

颜色条分箱数。

display

颜色条显示方式。

alpha

颜色条透明度覆盖值。

draw.ulim, draw.llim

是否绘制上/下限刻度。

angle

刻度标签角度。

available_aes

图例接受的 aesthetic。

返回值

一个 ggplot2 图例对象。