r - DiagrammeR fontsize 参数什么都不做
问题描述
我可以将下面的 fontsize 参数更改为graph [fontsize = 1]
or graph [fontsize = 10]
or 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]
推荐阅读
- themes - Prestashop 儿童主题
- azure-logic-apps - microsoft flow null required parameter
- laravel-5 - 带有标签输入的 Laravel Bootstrap 4
- terraform - 结构 terraform 模板和文件夹的建议
- javascript - dragover 事件,目标需要是可拖动的元素
- html - 在 svg 中绘制路径,垂直线之间有 90° 弧
- cordova - 离子类型错误:无效数据
- javascript - 将快速验证函数作为单独的语句调用而不是使用逗号分隔的调用不起作用
- node.js - next.js 的缺点超过 create react app + redux + ssr
- android - 方法总是从 Firestore 数据库查询返回 false