Skip to content

Commit

Permalink
Move guides to ggproto
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 12, 2024
1 parent adad94b commit 84262db
Show file tree
Hide file tree
Showing 16 changed files with 500 additions and 376 deletions.
9 changes: 0 additions & 9 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ S3method(create_layout,layout_ggraph)
S3method(create_layout,tbl_graph)
S3method(format,ggraph_geometry)
S3method(ggplot_build,ggraph)
S3method(guide_gengrob,edge_direction)
S3method(guide_geom,edge_direction)
S3method(guide_merge,edge_direction)
S3method(guide_train,edge_direction)
S3method(is.na,ggraph_geometry)
S3method(layout_to_table,"function")
S3method(layout_to_table,character)
Expand Down Expand Up @@ -251,7 +247,6 @@ import(vctrs)
importFrom(MASS,bandwidth.nrd)
importFrom(MASS,kde2d)
importFrom(Rcpp,sourceCpp)
importFrom(digest,digest)
importFrom(dplyr,"%>%")
importFrom(dplyr,arrange)
importFrom(dplyr,do)
Expand Down Expand Up @@ -291,7 +286,6 @@ importFrom(graphlayouts,layout_with_focus)
importFrom(graphlayouts,layout_with_pmds)
importFrom(graphlayouts,layout_with_sparse_stress)
importFrom(graphlayouts,layout_with_stress)
importFrom(grid,arrow)
importFrom(grid,convertHeight)
importFrom(grid,convertWidth)
importFrom(grid,convertX)
Expand All @@ -315,8 +309,6 @@ importFrom(grid,segmentsGrob)
importFrom(grid,setChildren)
importFrom(grid,textGrob)
importFrom(grid,unit)
importFrom(gtable,gtable)
importFrom(gtable,gtable_add_grob)
importFrom(igraph,"%--%")
importFrom(igraph,"vertex_attr<-")
importFrom(igraph,E)
Expand Down Expand Up @@ -374,7 +366,6 @@ importFrom(rlang,quo_is_symbol)
importFrom(rlang,quo_text)
importFrom(rlang,quos)
importFrom(rlang,sym)
importFrom(scales,discard)
importFrom(scales,identity_pal)
importFrom(scales,muted)
importFrom(scales,rescale_pal)
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* Allow `na.rm` in geoms (#301)
* If `check_overlap = TRUE` in `geom_node_text()` the rendering order is
reversed so that the top nodes are rendered, not the bottom ones
* Updated guides to the new ggplot2 interface. For `guide_edge_direction()`,
this update adds the option to use labels instead of an arrow using the
`labels` argument.

# ggraph 2.1.0

Expand Down
4 changes: 2 additions & 2 deletions R/edge_colourbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @export
guide_edge_colourbar <- function(..., available_aes = c("edge_colour", "edge_fill")) {
guide <- guide_colourbar(..., available_aes = available_aes)
guide$name <- 'edge_colourbar'
guide$params$name <- 'edge_colourbar'
guide
}
#' @rdname guide_edge_colourbar
Expand All @@ -34,7 +34,7 @@ guide_edge_coloursteps <- function(even.steps = TRUE, show.limits = NULL, ticks
available_aes = c("edge_colour", "edge_fill")) {
guide <- guide_coloursteps(even.steps = even.steps, show.limits = show.limits,
ticks = ticks, ..., available_aes = available_aes)
guide$name <- 'edge_coloursteps'
guide$params$name <- 'edge_coloursteps'
guide
}
#' @rdname guide_edge_coloursteps
Expand Down
Loading

0 comments on commit 84262db

Please sign in to comment.