View source: R/geom_arrowhead.R
geom_arrowhead | R Documentation |
'geom_arrowhead()' draws ranges defined by 'xmin' and 'xmax' as triangular polygon. draws genomic ranges as arrowheads, allowing to draw for instance segmental duplication maps.
geom_arrowhead(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
arrowhead_height = grid::unit(3, "mm"),
...
)
mapping , data , stat , position , na.rm , show.legend , inherit.aes , ... |
As is standard for ggplot2. |
arrowhead_height |
A 'grid::unit()' object providing the height of the arrowhead. (Default : '3'mm). |
This geom draws triangular polygons as arrowheads between defined start and end coordinates. Intended application of this geom is to visualize genomic coordinates defined by start and end position.
Plotting coordinates
'geom_roundrect()' require or can take the following aesthetics (required aesthetics are in bold):
- **xmin** - **xmax** - **y** - color - linewidth - linetype - alpha - fill - size
David Porubsky
## Create example data.frame to plot
plt.df <- data.frame(
xmin = c(10, 100, 200),
xmax = c(100, 190, 400)
)
## Plot rectangles with rounded edges
ggplot2::ggplot(plt.df) +
geom_arrowhead(ggplot2::aes(xmin = xmin, xmax = xmax, y = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.