标签: graphviz

失败:RuntimeError:保存图表失败!当运行rake erd命令时

我正在努力为我的rails应用程序中的模型生成图表.我在Windows 7上安装了graphviz

我跑的时候

rake erd OR rake erd filetype=dot
Run Code Online (Sandbox Code Playgroud)

我收到了以下错误

$ rake erd --trace
** Invoke erd (first_time)
** Invoke erd:generate (first_time)
** Invoke erd:options (first_time)
** Execute erd:options
** Invoke erd:load_models (first_time)
** Execute erd:load_models
Loading application environment...
** Invoke environment (first_time)
** Execute environment
Loading code in search of Active Record models...
** Execute erd:generate
Generating Entity-Relationship Diagram for 6 models...
rake aborted!
Saving diagram failed!
Verify that Graphviz is installed and in your path, or use filetype=dot. …
Run Code Online (Sandbox Code Playgroud)

ruby erd graphviz ruby-on-rails-3.2

1
推荐指数
2
解决办法
2689
查看次数

NetworkX - 绘制没有标签的图形

我在图中有一组节点和边。总共 460 个节点,总共 7606 条边。

节点的名称很长,而且我在绘制图形时遇到了麻烦,而这些长名称不会遮挡图形。

例如这里是一个示例节点名称:(A/mallard/Interior Alaska/9BM1974/2009(H4N6)流感人群,如果这里存在,就会熟悉这个命名)

我有一张图片说明了我面临的问题 这里.

我用来创建图形的代码如下:

import matplotlib.pyplot as plt
nx.draw_networkx(G)
plt.show()
Run Code Online (Sandbox Code Playgroud)

有人知道如何在没有所有这些标签的情况下绘制图形吗?

graph graphviz networkx python-2.7 ipython-notebook

1
推荐指数
1
解决办法
3241
查看次数

使用PyDot排列Dot图形的头部?

我正在制作一个动态生成的实验室实验图.这就是现在的样子:

实验图

理想情况下,我希望蓝色节点在顶部排成一行,这样无论导致它们的历史有多大,当前的实验都是可见的.有没有办法在GraphViz中做到这一点?我正在使用PyDot,但也打开手动编辑点图.

我在这里发现了一个可能相关的问题,是否会将它们放在子图帮助中?

编辑:这是当前的点代码.

digraph depgraph {
rankdir=BT;
dpi=400;
"/experiments/2013-12-19_planmacro" [shape=rectangle, href="/experiments/2013-12-19_planmacro", fontsize=11, color="#61BD4D", label="Plan 96-well plate montage macro", penwidth=2];
"/experiments/2013-07-01_fluoromax" [shape=rectangle, href="/experiments/2013-07-01_fluoromax", fontsize=11, color="#cccccc", label="Testing OD730", penwidth=2];
"/experiments/2013-06-12_cloning" [shape=rectangle, href="/experiments/2013-06-12_cloning", fontsize=11, color="#cccccc", label="Re-cloning TFs", penwidth=2];
"/experiments/2014-01-02_startwt" [shape=rectangle, href="/experiments/2014-01-02_startwt", fontsize=11, color="#61BD4D", label="Start WT Cultures", penwidth=2];
"/experiments/2013-06-04_learning" [shape=rectangle, href="/experiments/2013-06-04_learning", fontsize=11, color="#cccccc", label="Learning R + Bioconductor", penwidth=2];
"/experiments/2013-07-xx_induction" [shape=rectangle, href="/experiments/2013-07-xx_induction", fontsize=11, color="#61BD4D", label="induction again", penwidth=2];
"/experiments/2013-06-04_bg11" [shape=rectangle, href="/experiments/2013-06-04_bg11", fontsize=11, color="#cccccc", label="BG11 Media + Plates", penwidth=2];
"/experiments/2013-06-13_chipseq" [shape=rectangle, href="/experiments/2013-06-13_chipseq", fontsize=11, color="#61BD4D", …
Run Code Online (Sandbox Code Playgroud)

python graph dot graphviz pydot

1
推荐指数
1
解决办法
1448
查看次数

clojure.java.sh:没有这样的文件或目录

我编写了一个程序来组装.dot文件,并希望使用Clojure sh来提供编译命令.具体来说,我使用以下函数来执行此操作:

(defn compile-graphviz
  "Dumps graphviz-string to a file, then compiles it using dot."
  [graphviz-string]
  (do
    (spit "./tree.dot" graphviz-string)
    (sh "dot -Tpng \"/.tree.dot\" -o\"/.tree.png\"")))
Run Code Online (Sandbox Code Playgroud)

但是,当我运行它时,第二部分失败,在REPL上给出以下错误消息:

IOException error=2, No such file or directory  java.lang.UNIXProcess.forkAndExec (UNIXProcess.java:-2)
Run Code Online (Sandbox Code Playgroud)

我查看了文档sh和示例,我无法理解为什么这不起作用.我错过了什么?

shell clojure graphviz

1
推荐指数
1
解决办法
577
查看次数

在Windows 7上安装了pygraphviz,但无法导入它; 找不到_graphviz

我试图在我的64位Windows 7 SP1安装上安装pygraphviz.python setup.py install通过更正setup.py文件的以下行,我能够获得通常的命令:

include_dirs = r"C:\Program Files (x86)\Graphviz2.38\include"
library_dirs = r"C:\Program Files (x86)\Graphviz2.38\lib\release\lib"
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试导入它时,我收到以下错误:

Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygraphviz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pygraphviz\__init__.py", line 58, in <module>
    from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute
  File "pygraphviz\agraph.py", line 26, in <module>
    from . import …
Run Code Online (Sandbox Code Playgroud)

python graphviz pygraphviz

1
推荐指数
1
解决办法
3074
查看次数

如何使子图可见?

在下图中,两个子图不可见,但所有节点似乎都是随机放置的。如何创建可见的子图,例如一个盒子里面有我的 PlayerChars,另一个盒子里面有 NonPlayerChars?

digraph "All Characters" { 
  subgraph PlayerChars {
    label = "Player Characters";
    node [style=filled,color=yellow];
    Char1 -> Char2 [ label = "is sister of" ];
    Char1 -> Char2 [ label = "is brother of" ];
    label = "PCs";
  }
  subgraph NonPlayerChars {
    label = "Non-Player Characters";
    Person1 -> Char2 [label="hates"];
    Char2 -> Person1 [label="is indifferent"];
    Person2 -> Char2 [label="stole from"];
    Person1 -> Person2 [label="is father of"];
    Person2 -> Person1 [label="is daughter of"];
    Char1 -> Person2 [label="is in love with"]; …
Run Code Online (Sandbox Code Playgroud)

graphviz subgraph

1
推荐指数
1
解决办法
393
查看次数

无法安装graphviz依赖项

我尝试导入时遇到错误,dask.dot无法找到graphviz安装.但是,安装了graphviz和pygraphviz.

balter@exalab3:~$ conda install dask
Fetching package metadata ...........
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at /home/.../miniconda3:
#
dask                      0.13.0                   py35_0    conda-forge
balter@exalab3:~$ python
Python 3.5.3 | packaged by conda-forge | (default, Jan 23 2017, 19:01:48)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dask.dot
Traceback (most recent call last):
  File "/home/.../miniconda3/lib/python3.5/site-packages/dask/utils.py", line 63, in import_required
    return import_module(mod_name)
  File …
Run Code Online (Sandbox Code Playgroud)

python graphviz anaconda conda dask

1
推荐指数
1
解决办法
2976
查看次数

从 sklearn RandomForestClassifier 制作 graphviz(而不是来自单个 clf.estimators_)

Python。学习。RandomForestClassifier. 拟合后RandomForestClassifier,它是否会产生某种可用于创建图形可视化的单一“最佳”“平均”共识树?

是的,我查看了文档。不,它什么也没说。NoRandomForestClassifier没有tree_属性。但是,您可以从中获取森林中的个别树木,clf.estimators_因此我知道我可以从其中之一制作图形。这里有一个例子。我什至可以给所有的树打分,然后在森林中找到得分最高的树,然后选择那一棵树……但这不是我要问的。

我想根据“平均”最终随机森林分类器结果制作图形。这可能吗?或者,最终分类器是否使用底层树来生成分数和预测?

python graphviz decision-tree random-forest scikit-learn

1
推荐指数
1
解决办法
2398
查看次数

Meta-analysis flowchart

Is it possible to reproduce a meta-analysis type of flowchart as the one in the picture below using any R tool? 在此处输入图片说明

My attempt was using mermaid:

diagram = "
graph LR
  subgraph Screening
    b1-->b2
end
  subgraph Eligibility
    c1-->c2
  end
  subgraph Included
    d1-->d2
  end
  subgraph Identification
    a1-->a2
  end



"
mermaid(diagram)
Run Code Online (Sandbox Code Playgroud)

Which generated:

在此处输入图片说明

But I cannot find a way of connect the nodes accross the subgraphs.

Is there another tool better fitting to this kind of job? I am thinking on …

r graphviz mermaid diagrammer

1
推荐指数
1
解决办法
378
查看次数

嵌套有向子图

我正在尝试在 graphviz 中获取嵌套子图。

Graphviz版本是2.38.0(20140413.2041)

这是代码:

digraph G {
        subgraph cluster_win {
                style=filled;
                color=lightgrey;
                label = "Windows"

                subgraph extra_enabled {
                    fillcolor = "#EDF1F2"; 
                    color = "#028d35";
                    label="Subdirectory extra included";

                    node [style=filled,color=white];
                    config_debug1 [label = "Configure Debug"];
                    config_release1 [label = "Configure Release"];
                    build_debug1 [label = "Build"];
                    build_release1 [label = "Build"];

                    config_debug1 -> build_debug1;
                    config_release1 -> build_release1;

                    shape=rect;
                    style=rounded; 
                }

                subgraph extra_disabled {
                    label = "Subdirectory extra excluded";

                    config_debug2 [label = "Configure Debug"];
                    config_release2 [label = "Configure Release"];
                    build_debug2 [label = "Build"];
                    build_release2 …
Run Code Online (Sandbox Code Playgroud)

graphviz

1
推荐指数
1
解决办法
4520
查看次数