Is it possible to to change the background color from white to what I want?
The codes are:
library(DiagrammeR)
graph <-
create_graph() %>%
add_path(
n = 3,
type = "step",
label = c(
"Experiment", "Feature Finding", "Statistical Analysis"
),
node_aes = node_aes( # set node aesthetics
shape = c("rectangle", "rectangle", "rectangle"),
width = c(1.5, 1.5, 1.5),
color = "#3C3C3C",
fontcolor = "black",
fillcolor = c("#cbd20a", "#d3d3d3", "#d3d3d3"),
fontname = "Lato" #Lato
), # "#61acf0" blue, "#cbd20a" yellow green, "#e74a2f" red
edge_aes = edge_aes( # set edge aesthetics
color = "#3C3C3C"
)
) %>%
add_global_graph_attrs(attr = "layout", value = "dot", attr_type = "graph") %>%
add_global_graph_attrs(attr = "rankdir", value = "TD", attr_type = "graph")
# View the graph in the Viewer
graph %>% render_graph()