StupidBeauty
Read times:468Posted at:Mon Jan 4 05:31:27 2010 - no title specified

Graphviz的脚本使用

Graphviz的可执行程序不是叫graphviz,是叫dot的。 最简单的一个dot文件是这样的:

digraph ILoveYou

{

I -> You ;

}

把它保存成一个ILoveYou.dot文件,再执行“dot -Tpng ILoveYou.dot -o ILoveYou.png”,就生成一个图了。 很不好意思的是本座现在使用的代理上传不了图片,能上传图片的代理又正在卡。以后再补图。 图片补上了。

 本座要说的是两点,本来是在找这两个问题的答案的,但是查到的中文教程中好像都没有明确提到这两点,所以本座就写出来了。

1.在有向边上加上文字: 要实现这一点的话,需要,在表示边的语句后面加上"label"属性。首先要知道一点,“I->You”这整个语句是表示一条边的,知道了这一点,就很容易知道该怎么加上“label”属性了。

I -> You [ label = "Love" ];

修改过后,整个源代码是这样的:

digraph ILoveYou

{

I -> You [ label = "Love" ];

}

画出来的图现在是上传不了的。 图片现在能上传了。

 2.画出一个不可见的节点: 要做到这一点的话,需要先将妳想让她不可见的节点定义出来。 要在源代码中加入“node”定义代码块。 例如:

{

node [ style = invis ] TheThird

}

就是这样的,将这段代码块加到源代码中,并且再给TheThird来一条边,整个源代码就成了这样的:

digraph IloveYou

{

{

node [ style = invis ] TheThird

}

I -> You [ label = "Love" ];

TheThird -> You [ label = "Love" ];

}

其中的“[ style = invis ]”就起到了隐藏节点的作用,“invis”是“不可见”的意思。 画出来的图现在也是传不上去的。 现在传上去了。

 这三张图描述了多少悲欢离合、跌石起伏的爱情故事啊。

未知美人

未知美人

Your opinions

Posted at:Mon Jan 4 13:36:53 2010ys_sunshineEnter your comments here...
Posted at:Mon Jan 4 13:37:43 2010包子妹妹Enter your comments here...Enter your comments here...
Posted at:Mon Jan 4 13:45:50 2010ys_sunshine等着看图~~~~
Posted at:Mon Jan 4 14:42:07 2010gggarlicEnter your comments here...Enter your comments here...
Posted at:Mon Jan 4 14:43:09 2010ggarlic话说,我用vimdot玩过,不过不太会玩
Posted at:Sat Jan 9 00:26:20 2010xiatengEnter your comments here...Enter your comments here...
Posted at:Wed Nov 10 05:20:17 2010OriaEnter your comments here…Enter your comments here...
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4