问题描述
我正在尝试可视化一个Excel文件的两列:A列包含类别,而B列包含单个条目.点文件由Excel使用以下公式生成:
I am trying to visualize two columns of an an Excel file: Column A contains categories, while Column B contains individual entries. The dot file is generated by Excel using the following formula:
=IFERROR(CONCATENATE("subgraph cluster_",A2,"{""",B2,"""","; label =""",A2,"""}"),"")
然后,使用"unflatten"实用程序更均匀地分布节点,最后使用"dot"生成图
Afterwards the "unflatten" utility is used to distribute the nodes more evenly, and finally the "dot" is used to generate the graph
unflatten.exe -f -l 4 -c 6 -o FLATTENED.dot INPUTFILE.dot
dot -Tpng FLATTENED.dot > FLATTENED.png
生成以下图形
我想使图形更紧凑,并使类别与页面的上部对齐,我应该查看哪些命令来改善结果输出?
I would like to make the graph more compact, and align the categories to the upper egde of the page, what commands should I look into to improve the resulting output?
我已附加点文件
推荐答案
这是个主意:
- 创建一个带有x个图的点文件,而不是一个带有x个簇的图
- 解压它们
- 然后使用
gvpack
将所有图形打包在一起 - 和整齐的布局
- Instead of one graph with x clusters create a dot file with x graphs
- unflatten them
- then use
gvpack
to pack all graphs together - and neato to layout
基本思想是使用图形而不是群集,因此您可以使用gvpack
打包图形.
The basic idea is to use graphs instead of clusters so you can use gvpack
to pack the graphs.
类似的东西:
unflatten -f -l 4 -c 6 input.dot | dot | gvpack -array_t6 | neato -s -n2 -Tpng -o output.png
不确定是否unflatten处理带有多个图形的文件.
Not sure though whether unflatten handles files with several graphs.
(对不起,没有时间检查它).
(Sorry, no time to check it).
这篇关于GraphViz:压缩自动生成的图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!