Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR doesn't correspond to an issue, and is more like upkeep.

Briefly, all geoms now listen to the theme(geom) field and also theme_graph() and set_graph_style() work with ink/paper.

library(tidygraph)
#> 
#> Attaching package: 'tidygraph'
#> The following object is masked from 'package:stats':
#> 
#>     filter
devtools::load_all("~/packages/test/ggraph/")
#> ℹ Loading ggraph
#> Loading required package: ggplot2

graph <- as_tbl_graph(highschool) |> 
  mutate(Popularity = centrality_degree(mode = 'in'))

ggraph(graph, layout = 'kk') + 
  geom_edge_fan(aes(alpha = after_stat(index)), show.legend = FALSE) + 
  geom_node_point(aes(size = Popularity)) + 
  facet_edges(~year) + 
  theme_graph(ink = "red", paper = "cornsilk")

Created on 2025-10-03 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant