thomasp85 / ggraph

Grammar of Graph Graphics
https://ggraph.data-imaginist.com
Other
1.08k stars 116 forks source link

Feature Request: Layout arguments as aesthetics #289

Closed billdenney closed 10 months ago

billdenney commented 3 years ago

I often use manual layouts. It seems like it would often be simpler to pass the layout arguments to ggraph() via an aes() rather than ... arguments to ggraph(). I realize that these aesthetics are categorically different than those used for the geom_*()s, so it could be confusing to the user, but in other ways, it seems like a logical fit.

Mostly, it is a feature for consideration that I think could help, but I would completely understand if it were not considered a good fit.

schochastics commented 2 years ago

As the developer of the graphlayouts package I would vote against this. While there are some parameters that are similar across different layout algorithms but overall, they differ significantly. As such, I think the ... is the most feasible approach, given also that most parameters have very good default values that do not need to be changed much.

thomasp85 commented 10 months ago

Agree with David. Further, there is no established or obvious conventions over whether node or edge data should be referred when creating a layout

billdenney commented 10 months ago

Thanks for considering it. I understand the desire not to include it.