File: draw_plot_label.Rd

package info (click to toggle)
r-cran-cowplot 1.1.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,564 kB
  • sloc: sh: 13; makefile: 5
file content (46 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draw.R
\name{draw_plot_label}
\alias{draw_plot_label}
\title{Add a label to a plot}
\usage{
draw_plot_label(
  label,
  x = 0,
  y = 1,
  hjust = -0.5,
  vjust = 1.5,
  size = 16,
  fontface = "bold",
  family = NULL,
  color = NULL,
  colour,
  ...
)
}
\arguments{
\item{label}{String (or vector of strings) to be drawn as the label.}

\item{x}{The x position (or vector thereof) of the label(s).}

\item{y}{The y position (or vector thereof) of the label(s).}

\item{hjust}{Horizontal adjustment.}

\item{vjust}{Vertical adjustment.}

\item{size}{Font size of the label to be drawn.}

\item{fontface}{Font face of the label to be drawn.}

\item{family}{(optional) Font family of the plot labels. If not provided, is taken from the current theme.}

\item{color, colour}{(optional) Color of the plot labels. If not provided, is taken from the current theme.}

\item{...}{Other arguments to be handed to \code{draw_text}.}
}
\description{
This function adds a plot label to the upper left corner of a graph (or an arbitrarily specified position). It takes all the same parameters
as \code{draw_text}, but has defaults that make it convenient to label graphs with letters A, B, C, etc. Just like \code{draw_text()},
it can handle vectors of labels with associated coordinates.
}