-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make nice-looking plots of dependency trees #14
Comments
@enantz-lilly suggested visNetwork. (This need not replace library(visNetwork)
igraph_object = drake:::dbug()$graph
network_data = toVisNetworkData(igraph_object)
network_data$edges$arrows = "to" # For directed edges
visNetwork(nodes = network_data$nodes, edges = network_data$edges, height = "500px") It would also be nice to have different-looking nodes for imports vs targets or files vs functions vs non-function objects. |
CodeDepends uses Rgraphviz, but that one is on Bioconductor. |
I will release improved plotting functionality with the next version of drake. Here's what it looks like in the development version. Now is a great time for suggestions and requests. attach(drake:::dbug()) # Workflow and environment I use for debugging
envir$f = function(x) g(x) + a + NOT_FOUND # Sometimes some symbols cannot be imported as objects. Drake just rolls with it, even in make().
plot_graph(plan = plan, envir = envir) # Build and render the graph |
Even better: let's sort the graph from left to right and show everyone how the parallel computing works. In the new graph below, each column is a separate parallelizable stage. When you call For those who are curious, I am now happily committed to visNetwork. I set the "level" column in the "nodes" data frame in Before I officially mark this issue as solved, I need to say more about graphing in the quickstart vignette at least. |
It should be as simple as
DiagrammeR::from_igraph(build_graph(...))
, butfrom_igraph()
does not yet work for me.With
DiagrammeR
, I should also be able to assign different node colors for objects, functions, files, targets, etc. Maybe I can color edges by whether a target is created with a command or imported.The text was updated successfully, but these errors were encountered: