diff --git a/NEWS.md b/NEWS.md index 329b50282..12ba71098 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ ## Bug fixes - In `drake` 7.0.0, if you run `make()` in interactive mode and respond to the menu prompt with an option other than `1` or `2`, targets will still build. +- Make sure file outputs show up in `drake_graph()`. The bug came from `append_output_file_nodes()`, a utility function of `drake_graph_info()`. ## New features @@ -10,8 +11,10 @@ ## Enhancements -- Improve `drake_ggraph()`: hide node labels by default and render the arrows behind the nodes. -- Print an informative error message when the user supplies a `drake` plan to the `config` argument of a function. +- Improve `drake_ggraph()` + - Hide node labels by default and render the arrows behind the nodes. + - Print an informative error message when the user supplies a `drake` plan to the `config` argument of a function. + - By default, use gray arrows and a black-and-white background with no gridlines. # Version 7.0.0 diff --git a/R/utils-graphinfo.R b/R/utils-graphinfo.R index abbcc792f..2cb9ca1f1 100644 --- a/R/utils-graphinfo.R +++ b/R/utils-graphinfo.R @@ -23,7 +23,7 @@ append_build_times <- function(config) { append_output_file_nodes <- function(config) { with(config, { - cols <- setdiff(colnames(nodes), c("id", "label", "level", "shape")) + cols <- setdiff(colnames(nodes), c("id", "label", "level", "shape", "type")) for (target in intersect(names(file_out), nodes$id)) { files <- intersect(file_out[[target]], nodes$id) if (length(files)){ diff --git a/R/vis-ggraph.R b/R/vis-ggraph.R index d79186b20..c56f82c8a 100644 --- a/R/vis-ggraph.R +++ b/R/vis-ggraph.R @@ -133,7 +133,12 @@ render_drake_ggraph <- function( ggplot2::scale_color_manual(values = colors) + ggplot2::scale_shape_manual(values = shapes) + ggplot2::ggtitle(main) + - ggplot2::labs(x = "", y = "") + ggplot2::labs(x = "", y = "") + + ggplot2::theme_bw() + + ggplot2::theme( + panel.grid.major = ggplot2::element_blank(), + panel.grid.minor = ggplot2::element_blank() + ) if (label_nodes) { out <- out + ggraph::geom_node_text(ggplot2::aes(label = label)) }