I want to create a flowchart with the DiagrammeR
Package in R
. Within some nodes, I want to reduce the font size of some parts of the text.
Consider the following example in R
:
library("DiagrammeR")
# Create a node data frame (ndf)
ndf <- create_node_df(n = 4,label = c("aaa", "bbb",
"Same size\nThese letters\nshould be smaller",
"ccc"))
# Create an edge data frame (edf)
edf <- create_edge_df(from = c(1, 2, 3, 3),
to = c(4, 3, 1, 4))
# Create a graph with the ndf and edf
graph <- create_graph(nodes_df = ndf,
edges_df = edf)
# Print graph
graph %>%
render_graph()
The font size of the node in the middle should partly be reduced. The text "Same size" should be kept as it is. The font size of the text "These letters should be smaller" should be reduced.
Question: How could I adjust the font size for some parts of the text within a node?