Skip to content

Commit

Permalink
get nodes from layout
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Lin Pedersen <thomasp85@gmail.com>
  • Loading branch information
loreabad6 and thomasp85 authored Jan 29, 2024
1 parent 67b8278 commit 0447906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/geom_node_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ geom_node_sf <- function(mapping = NULL, data = get_sf_nodes(),

get_sf_nodes <- function(){
function(layout) {
nodes <- sf::st_as_sf(attr(layout, "graph"), "nodes")
nodes <- sf::st_as_sf(layout)
attr(nodes, 'type_ggraph') <- 'node_ggraph'
nodes
}
Expand Down

0 comments on commit 0447906

Please sign in to comment.