Skip to content

Commit

Permalink
import and basic functionality for geom_segment
Browse files Browse the repository at this point in the history
  • Loading branch information
Knicey committed Jun 12, 2024
1 parent 0177fc1 commit b9795b4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(GeomPolygonHollow)
import(dplyr)
import(ggplot2)
28 changes: 28 additions & 0 deletions R/geom_segment_glyph.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' @import ggplot2
#' @import dplyr
#' @export

GeomPolygonHollow <- ggproto("GeomPolygonHollow", GeomPolygon,
default_aes = aes(
colour = "black",
fill = NA,
linewidth = 0.5,
linetype = 1,
alpha = NA
)
)

geom_chull <- function(mapping = NULL, data = NULL, stat = "chull",
position = "identity", na.rm = FALSE,
show.legend = NA, inherit.aes = TRUE, ...) {
layer(
geom = GeomPolygonHollow,
data = data,
mapping = mapping,
stat = stat,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(na.rm = na.rm, ...)
)
}

0 comments on commit b9795b4

Please sign in to comment.