DiagrammeR fontsize 参数什么都不做
DiagrammeR fontsize argument does nothing
我可以将下面的字体大小参数更改为 graph [fontsize = 1]
或 graph [fontsize = 10]
或 graph [fontsize = 100]
,并且我的 R Studio 查看器中的输出是相同的。看起来字体默认为填充它占据的节点的合理大小。如何更改字体大小?
library(DiagrammeR)
grViz("
digraph test {
graph [fontsize = 10]
node [shape = box]
A [label = 'FooBar']
B [label = 'BarFoo']
A -> B
}
")
您更改节点声明中节点标签的字体大小。
您可以使用 node
更改它:node [shape = box, fontsize=5]
或在特定节点标签中使用:A [label = 'FooBar', fontsize=5]
我可以将下面的字体大小参数更改为 graph [fontsize = 1]
或 graph [fontsize = 10]
或 graph [fontsize = 100]
,并且我的 R Studio 查看器中的输出是相同的。看起来字体默认为填充它占据的节点的合理大小。如何更改字体大小?
library(DiagrammeR)
grViz("
digraph test {
graph [fontsize = 10]
node [shape = box]
A [label = 'FooBar']
B [label = 'BarFoo']
A -> B
}
")
您更改节点声明中节点标签的字体大小。
您可以使用 node
更改它:node [shape = box, fontsize=5]
或在特定节点标签中使用:A [label = 'FooBar', fontsize=5]