如题,想让“分税制改革”分别到“财政集权”和“体制改革”之间的线设置 splines = ortho
,即轴对齐的折角线,然而设置了似乎不起作用。问了 AI,也没得到好用的答案。请坛友们帮忙瞅瞅。代码如下:
library(DiagrammeR)
grViz(diagram = "digraph{
# 定义图形布局,从左至右
graph[rankdir = LR]
# 定义节点
node[shape = rectangle, style = dashed]
A1[label = '财政包干:中央财政困难+\n国家财政困难']
A2[label = '地方财政增长\n方式转变:工\n商业税收与\n土地财政', width = 1.5]
node[shape = rectangle,style = filled, fillcolor = 'gray', color = 'white', width = 2]
B1[label = '分税制改革']
B2[label = '土地和要素\n市场改革']
B3[label = '五个统筹']
B4[label = '农村税费改革']
B5[label = '乡财县管,\n省直管县']
B6[label = '转移支付改革']
node[shape = rectangle, style = solid, color = 'black', width = 1]
C1[label = '财政\n集权']
C4[label = '体制\n改革']
C2[label = '国税、地税分立', width = 2]
C3[label = '税收向中央集中', width = 2]
C5[label = '支出分权', width = 2]
C6[label = '转移支付体系', width = 2]
C7[label = '总体均衡', width = 1.5]
C8[label = '县乡财政危机\n(纵向失衡)', width = 1.5]
C9[label = '地区间失衡\n(横向失衡)', width = 1.5]
C10[label='城市化大\n兴土木']
C11[label='招商引资']
C12[label='重生产\n轻民生']
C13[label='农民负担']
# 定义第一个子图
subgraph cluster1{
label = '央地博弈:\n讨价还价'
style = solid
color = white
A2; C7; C8; C9
}
# 定义第二个子图
subgraph cluster2{
label = '社会现象'
style = solid
color = white
C10; C11; C12; C13
}
# 定义第三个子图
subgraph cluster3{
label = '继续改革'
style = solid
color = white
B2; B3; B4; B5; B6
}
# 定义第四个子图,隐形线,调换 C1和 C4的位置
subgraph cluster4{
rankdir = TB
rank = same
C1 -> C4[style = invis]
}
# 定义线
edge[arrowsize = 1, samehead = h1, sametail = t1]
A1 -> B1;
C1 -> {C2, C3}; C4 -> {C5, C6}
{C3, C5} -> A2;
C6 -> {C7, C8, C9}
A2 -> {C10, C11, C12, C13}
C8 -> {C13, B5, B6}; C9 -> B6
C10 -> {B2, B3}; C12 -> B3; C13 -> {B3, B4}
edge[headport = 'w', tailport = 'w', splines = ortho, constraint = false]
B1 -> {C1, C4}
# 设置多个节点,维持在一个垂直线上
{rank = same; A1; B1; C1; C4;}
}")