Dot 与 GraphViz 经验总结
2016-08-16 22:30
363 查看
reference
d3.js gallery: 仅仅是作个比较,d3的图确实好看一点dot graphviz gallery: 其实也还不错
graphviz documence: 不同于官方文档, github 上的文档更新会快一点,当然个人觉得也好一点。
dot pdf documence: 简洁的pdf文档,省去了多余的东东。
dot html documence: 很好的example
dot 国人教程
高级API for style,type and other attributes
color gallery
ubuntu
注:本人仅在ubuntu上进行了测试安装
sudo apt-get install graphviz在ubuntu16.04上就这样安装好了,从源码上安装失败,少了scan.c,反正能用,所以不管了。
使用
dot -Tjpg example.dot -oexample.jpgexample.dot
graph graphname{ a--b; b--c; b--d; d--a; }
指明输出格式为jpg, -Tjpg, 所有输出格式
指明输出文件名为example.jpg -oexample.jpg
example.jpg
An Ugly Tool and A nice Plugin
DotEditor: 编辑功能极弱,用法是用别的编辑器进行dot文件编辑,再复制到DotEditor中进行显示。[gedit plugin external tool]:自定义功能极强,可结合gedit 的编辑能力,非常好用。在下面的脚本和图示配置下,按
F5即可显示dot图像。
#!/bin/sh format=jpg fin=${GEDIT_CURRENT_DOCUMENT_NAME} fout=${GEDIT_CURRENT_DOCUMENT_NAME}.${format} touch ${fout} echo ${fin} echo ${fout} dot -T${format} $fin -o${fout} & gnome-open ${fout}
更多gedit变量及external tool的用法可以参考官网
更多的gedit external tool 插件脚本
High Level Summary
for subgraph, thecluster_i(i=0,1,2,…) is special
we can use
{...}to set local environment
set node
node [style=filled,color=lightpink];
set edge
a->b [label='...']
use set
{a,b,c}->c; a->{b,c,d}
set edge direction
edge [dir=both/none/forward/back;penwidth=3],
digraph,
graph
set graph direction
rankdir="TB", "LR", "BT", "RL"
for
dash,solid...see
styleat 高级API for style,type and other attributes
for color
node [style=filled,color=lightyellow];see color gallery
digraph G { subgraph Ncluster_0 { style=filled; color=lightgrey; node [style=filled,color=lightgray]; start -> "motion detection" -> "connected component analysis" -> "small area filter" -> "object feature extraction" -> "object association" -> "association graph" -> "find min tree"; class -> "IBGS.process()" -> "icvprCcaByTwoPass()" -> "QYzbxTrackingFeature.getObjectsFromMask()" -> "QYzbxTrackingFeature.getObjects()" -> "TrackingObjectAssociation.adjecentObjectAssociation()" -> "TrackingObjectAssociation.process()" -> "MotionBasedTracker.objectTracking()"; data -> "image:CV_8UC3" -> "mask:CV_8UC1" -> "vector<mask>" -> "vector<ObjectFeature>" -> "list<FrameFeature>" ->"DirectGraph"->"tracking record"; label="2016/08/20: Connected Component Analysis" } subgraph Ncluster_1 { style=filled color=blue node [style=filled,color=lightpink]; "motion detection" -> "contour analysis" -> "kalman filter" -> "hungrian algorithm" -> "trakcking result" data -> "image:CV_8UC3" -> "mask:CV_8UC1" -> "contour:vector<Point>" -> "vector<trackingObjectFeature>" -> "MultiObjectTracker:vector<singleObjectTracker>" label="2016/08/22: findContour" } subgraph Ncluster_2 { style=filled color=red node [style=filled,color=lightyellow]; "motion detection" -> "blob detection" -> "kalman filter" -> "hungrian algorithm" -> "trakcking result" data -> "image:CV_8UC3" -> "mask:CV_8UC1" -> "blob feature" -> "vector<trackingObjectFeature>" -> "MultiObjectTracker:vector<singleObjectTracker>" label="2016/08/23: blob detector" } }
digraph G{ {node[style=filled,color=lightyellow] input "QString:configFile" "QString:videoFile" "TrackingStatus*:status" } {node[style=filled,color=lightpink] function "void:process()" "void:processOne()" "vector<trackingObjectFeature>:getObjects()" "void:Tracking()" "void:run()" "void:stop()" } {node[style=filled,color=lightblue] explain "show tracking result" "init singleObjectTracker" "update singleObjectTracker" } {"QString:configFile","QString:videoFile"}->"void:process()" "void:process()"->{"Mat:img_input","Mat:img_foreground","Mat:img_background"} "void:process()"->"void:processOne()"->"vector<trackingObjectFeature>:getObjects()"->"vector<trackingObjectFeature>"->"void:Tracking()" "void:Tracking()"->"init singleObjectTracker"->"update singleObjectTracker"[label="kalman and hungrian"] "void:processOne()"->"show tracking result" "void:process()"->"void:run()" {"Mat:img_input","Mat:img_foreground","Mat:img_background","TrackingStatus*:status"}->"void:processOne()" {edge [dir=both;penwidth=3] "TrackingStatus*:status"->"TrackingStatus*:globalTrackingStatus"[label="always equal to"] {"TrackingStatus*:globalTrackingStatus","bool:globalStop"}->"void:run()" "void:process()"->"TrackingStatus*:status" } "void:stop()"->"bool:globalStop" }
相关文章推荐
- 水晶报表连接MS-SQL-Server 2000的经验总结
- 侯捷专栏:长吁一口气(三年大陆经验总结)
- 关于解决WebSphere服务不能启动问题的几点经验总结
- 在.NET中调用Oracle9i存储过程经验总结
- 测试的一点经验总结
- 关于ASP.NET在IIS一些问题的经验总结(zz)
- 关于ASP.NET在IIS一些问题的经验总结
- 关于ASPNET在IIS一些问题的经验总结
- [导入]关于ASPNET在IIS一些问题的经验总结
- ‘年轻’绝对不是‘经验’的对手---- 对一些开发经验的总结
- 由PPP项目总结的几点项目经验
- arcims开发经验总结(2) (地图放大缩小、鹰眼实现逻辑)
- 在.NET中调用Oracle9i存储过程经验总结
- 定义变量也是如此痛苦,经验值得总结。
- 关于ASPNET在IIS一些问题的经验总结
- 大项目研发经验总结之摩西十戒
- 考完了托福,总结一下9天复习参加托福的经验吧
- Delphi小经验总结
- VC+Matlab混合编程经验总结
- JSP学习经验总结(转)