Skip to contents

The shape targets::tar_visnetwork() draws for each vertex type, as a hard-coded copy - they belong to targets, not ggtargets, and are checked against the installed targets version in the package's own tests. It is the default shapes of tar_ggplot()/ggplot_dag()/ dag_layers(), so a pipeline's nodes are drawn by type: a regular target (stem) is a circle, a dynamic-branching target (pattern) a square, and an imported function and object an up and a down triangle. Imports are only in the graph with tar_ggplot(targets_only = FALSE).

Usage

targets_node_shapes()

Value

A named character vector of shape names, one per type. The shapes a node can take are "circle", "square", "diamond", "triangle" and "triangle_down".

Examples

targets_node_shapes()
#>            stem         pattern        function          object 
#>        "circle"        "square"      "triangle" "triangle_down" 

dag <- as_dag(
  data.frame(from = c("a", "a", "b"), to = c("b", "c", "c")),
  nodes = data.frame(
    name = c("a", "b", "c"),
    type = c("stem", "stem", "pattern")
  )
)
ggplot_dag(dag)