Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
282 views
in Technique[技术] by (71.8m points)

graph - DOT notation rank not placing items on the same horizontal line/plane

This is what I'm going for: https://media-us.amboss.com/media/thumbs/big_58ac9ed16c2bf.jpg

And this is what I have (just the first bit of it for now):

digraph G {

"Palpable breast mass" -> "Age of patient?";
"Age of patient?" -> "Clinical assessment: probability of malignancy?" [label="< 30yo"];
"Clinical assessment: probability of malignancy?" -> "Reexamine 3-10 days after onset of menstruation" [label="Low"];
"Reexamine 3-10 days after onset of menstruation" -> "Ultrasound and/or FNA" [label="Suspicious mass"];
"Clinical assessment: probability of malignancy?" -> "Ultrasound and/or FNA" [label="High"];
"Ultrasound and/or FNA" -> "Mammography" [label="No visualization possible"];
"Age of patient?" -> "Mammography" [label="> 30yo"];
"Mammography" -> "Ultrasound and/or FNA" [label="Inconclusive"];
{rank=1;
"Palpable breast mass";
}
{rank=2;
"Age of patient?";
}
{rank=3;
"Clinical assessment: probability of malignancy?";
}
{rank=4;
"Reexamine 3-10 days after onset of menstruation";
"Ultrasound and/or FNA";
"Mammography";
}
}

However, the ranks aren't matching up in the way I want. I would like for all the items in rank=4 to be on the same horizontal line/plane. Here is what it looks like instead:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Nevermind, I realized that I need to write rank=same in each bracket instead of an actual value. Like this:

{rank=same;
"Palpable breast mass";
}
{rank=same;
"Age of patient?";
}
{rank=same;
"Clinical assessment: probability of malignancy?";
}
{rank=same;
"Reexamine 3-10 days after onset of menstruation";
"Ultrasound and/or FNA";
"Mammography";
}

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...