File: draw_line.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 (32 lines) | stat: -rw-r--r-- 755 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draw.R
\name{draw_line}
\alias{draw_line}
\title{Draw a line from connected points}
\usage{
draw_line(x, y, ...)
}
\arguments{
\item{x}{Vector of x coordinates.}

\item{y}{Vector of y coordinates.}

\item{...}{geom_path parameters such as \code{colour}, \code{alpha}, \code{size}, etc.}
}
\description{
Provide a sequence of x values and accompanying y values to draw a line on a plot.
}
\details{
This is a convenience function, providing a wrapper around ggplot2's \code{geom_path}.
}
\examples{
ggdraw() +
  draw_line(
    x = c(0.2, 0.7, 0.7, 0.3),
    y = c(0.1, 0.3, 0.9, 0.8),
    color = "blue", size = 2
  )
}
\seealso{
\code{\link{geom_path}}, \code{\link{ggdraw}}
}