- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在为我的实验室实验制作一个动态生成的图表。这是现在的样子:
理想情况下,我希望蓝色节点在顶部排成一条直线,这样无论导致它们的历史有多大,当前的实验都是可见的。有没有办法在 GraphViz 中做到这一点?我正在使用 PyDot,但也可以手动编辑点图。
我发现了一个可能相关的问题 here , 将它们放在子图中会有帮助吗?
编辑:这是当前的点代码。
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", label="ChIP-Seq Mini-Preps", penwidth=2];
"/experiments/2013-06-06_cloning" [shape=rectangle, href="/experiments/2013-06-06_cloning", fontsize=11, color="#cccccc", label="Re-Cloning TFs", penwidth=2];
"/experiments/2013-06-21_cleaning" [shape=rectangle, href="/experiments/2013-06-21_cleaning", fontsize=11, color="#cccccc", label="cleaning day", penwidth=2];
"/experiments/2013-12-15_rnaextraction" [shape=rectangle, href="/experiments/2013-12-15_rnaextraction", fontsize=11, color="#cccccc", label="Another RNA extraction to test TRI:pellet ratios", penwidth=2];
"/experiments/2013-09-27_iptgplates" [shape=rectangle, href="/experiments/2013-09-27_iptgplates", fontsize=11, color="#61BD4D", label="IPTG Plates", penwidth=2];
"/experiments/2013-06-03_growgfp" [shape=rectangle, href="/experiments/2013-06-03_growgfp", fontsize=11, color="#cccccc", label="Grow sfGFP E. Coli", penwidth=2];
"/experiments/2014-01-02_restreak" [shape=rectangle, href="/experiments/2014-01-02_restreak", fontsize=11, color="#61BD4D", label="Restreak Plates", penwidth=2];
"/experiments/2013-06-25_induction4" [shape=rectangle, href="/experiments/2013-06-25_induction4", fontsize=11, color="#cccccc", label="more careful induction", penwidth=2];
"/experiments/2013-10-05_rnaextraction" [shape=rectangle, href="/experiments/2013-10-05_rnaextraction", fontsize=11, color="#cccccc", label="RNA extraction", penwidth=2];
"/experiments/2013-06-25_induction1" [shape=rectangle, href="/experiments/2013-06-25_induction1", fontsize=11, color="#cccccc", label="GFP induction timepoints", penwidth=2];
"/experiments/2013-06-25_induction3" [shape=rectangle, href="/experiments/2013-06-25_induction3", fontsize=11, color="#cccccc", label="GFP, YFP induction", penwidth=2];
"/experiments/2013-06-25_induction2" [shape=rectangle, href="/experiments/2013-06-25_induction2", fontsize=11, color="#cccccc", label="GFP, YFP Induction", penwidth=2];
"/experiments/2013-06-06_tophatcufflinks" [shape=rectangle, href="/experiments/2013-06-06_tophatcufflinks", fontsize=11, color="#61BD4D", label="Tophat + Cufflinks", penwidth=2];
"/experiments/2013-07-21_methods" [shape=rectangle, href="/experiments/2013-07-21_methods", fontsize=11, color="#cccccc", label="compare extraction methods", penwidth=2];
"/experiments/2013-07-xx_rnaprep" [shape=rectangle, href="/experiments/2013-07-xx_rnaprep", fontsize=11, color="#cccccc", label="RNA isolation prep", penwidth=2];
"/experiments/2013-12-29_depgraph" [shape=rectangle, href="/experiments/2013-12-29_depgraph", fontsize=11, color="#61BD4D", label="Organize metadata", penwidth=2];
"/experiments/2013-06-11_wt" [shape=rectangle, href="/experiments/2013-06-11_wt", fontsize=11, color="#cccccc", label="Grow induced WT", penwidth=2];
"/experiments/2013-08-06_directzol" [shape=rectangle, href="/experiments/2013-08-06_directzol", fontsize=11, color="#61BD4D", label="2nd try at DirectZol", penwidth=2];
"/experiments/2013-06-04_primers" [shape=rectangle, href="/experiments/2013-06-04_primers", fontsize=11, color="#cccccc", label="Check Primers", penwidth=2];
"/experiments/2013-06-04_break" [shape=rectangle, href="/experiments/2013-06-04_break", fontsize=11, color="#cccccc", label="Finals and \"Break\"", penwidth=2];
"/experiments/2013-06-04_overview" [shape=rectangle, href="/experiments/2013-06-04_overview", fontsize=11, color="#cccccc", label="CyanoTF Overview", penwidth=2];
"/experiments/2013-12-17_rnaextraction" [shape=rectangle, href="/experiments/2013-12-17_rnaextraction", fontsize=11, color="#cccccc", label="RNA extraction with varying amounts of TRI", penwidth=2];
"/experiments/2013-06-25_inductionprep" [shape=rectangle, href="/experiments/2013-06-25_inductionprep", fontsize=11, color="#cccccc", label="Induction Prep", penwidth=2];
"/experiments/2013-07-xx_pgtx" [shape=rectangle, href="/experiments/2013-07-xx_pgtx", fontsize=11, color="#cccccc", label="making PGTX", penwidth=2];
"/experiments/2013-06-13_cloning" [shape=rectangle, href="/experiments/2013-06-13_cloning", fontsize=11, color="#cccccc", label="Re-cloning TFs", penwidth=2];
"/experiments/2013-12-11_rnaextraction" [shape=rectangle, href="/experiments/2013-12-11_rnaextraction", fontsize=11, color="#cccccc", label="RNA extraction to test TRI:pellet ratios", penwidth=2];
"/experiments/2013-12-27_depgraph" [shape=rectangle, href="/experiments/2013-12-27_depgraph", fontsize=11, color="#cccccc", label="Working on the DepGraph plugin", penwidth=2];
"/experiments/2013-12-21_buildgitit" [shape=rectangle, href="/experiments/2013-12-21_buildgitit", fontsize=11, color="#cccccc", label="Building Gitit from Source", penwidth=2];
"/experiments/2013-06-11_stanley" [shape=rectangle, href="/experiments/2013-06-11_stanley", fontsize=11, color="#cccccc", label="Stanley Protocols", penwidth=2];
"/experiments/2013-06-24_bgfpc" [shape=rectangle, href="/experiments/2013-06-24_bgfpc", fontsize=11, color="#cccccc", label="100X BG-FPC Media", penwidth=2];
"/experiments/2013-07-10_losses" [shape=rectangle, href="/experiments/2013-07-10_losses", fontsize=11, color="#cccccc", label="taking stock of strains", penwidth=2];
"/experiments/2013-07-22_methods3" [shape=rectangle, href="/experiments/2013-07-22_methods3", fontsize=11, color="#cccccc", label="compare extraction quality", penwidth=2];
"/experiments/2013-06-04_bg11" -> "/experiments/2013-06-04_break" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-12-19_planmacro" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-xx_pgtx" -> "/experiments/2013-07-xx_rnaprep" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-xx_rnaprep" -> "/experiments/2013-07-21_methods" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_break" -> "/experiments/2013-06-03_growgfp" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-12_cloning" -> "/experiments/2013-06-13_cloning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_break" -> "/experiments/2013-06-06_cloning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-22_methods3" -> "/experiments/2013-08-06_directzol" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-25_induction2" -> "/experiments/2013-06-25_induction3" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-25_induction4" -> "/experiments/2013-07-01_fluoromax" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-11_wt" -> "/experiments/2013-06-25_inductionprep" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-12-21_buildgitit" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-06-04_break" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-21_methods" -> "/experiments/2013-07-22_methods3" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-12-17_rnaextraction" -> "/experiments/2014-01-02_startwt" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-25_induction1" -> "/experiments/2013-06-25_induction2" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_primers" -> "/experiments/2013-06-06_cloning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-12-21_buildgitit" -> "/experiments/2013-12-27_depgraph" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_bg11" -> "/experiments/2013-06-24_bgfpc" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-12-11_rnaextraction" -> "/experiments/2013-12-15_rnaextraction" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-11_stanley" -> "/experiments/2013-06-13_chipseq" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_learning" -> "/experiments/2013-06-06_tophatcufflinks" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_break" -> "/experiments/2013-06-04_primers" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-12-27_depgraph" -> "/experiments/2013-12-29_depgraph" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-25_induction3" -> "/experiments/2013-06-25_induction4" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-06_cloning" -> "/experiments/2013-06-12_cloning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-06-04_bg11" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-07-xx_pgtx" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-01_fluoromax" -> "/experiments/2013-07-xx_induction" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-10-05_rnaextraction" -> "/experiments/2013-12-11_rnaextraction" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-12-15_rnaextraction" -> "/experiments/2013-12-17_rnaextraction" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-10_losses" -> "/experiments/2013-06-21_cleaning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-25_inductionprep" -> "/experiments/2013-06-25_induction1" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-21_cleaning" -> "/experiments/2014-01-02_restreak" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-06-04_learning" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-13_cloning" -> "/experiments/2013-07-10_losses" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-01_fluoromax" -> "/experiments/2013-09-27_iptgplates" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-03_growgfp" -> "/experiments/2013-06-11_wt" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-04_overview" -> "/experiments/2013-06-11_stanley" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-06-24_bgfpc" -> "/experiments/2013-06-25_inductionprep" [color="#CCCCCC", fontsize=11, penwidth=2];
"/experiments/2013-07-21_methods" -> "/experiments/2013-10-05_rnaextraction" [color="#CCCCCC", fontsize=11, penwidth=2];
}
最佳答案
您可以使用“rank=same”方法:
strict digraph {
{rank=same; 3; 4;}
1 -> 2;
1 -> 4;
2 -> 3;
}
此 pydot 代码生成相同的图像:
import pydot
node1 = pydot.Node(1)
node2 = pydot.Node(2)
node3 = pydot.Node(3)
node4 = pydot.Node(4)
P = pydot.Dot()
P.add_edge(pydot.Edge(node1,node2))
P.add_edge(pydot.Edge(node2,node3))
P.add_edge(pydot.Edge(node1,node4))
S = pydot.Subgraph(rank='same')
S.add_node(node3)
S.add_node(node4)
P.add_subgraph(S)
P.write('foo.dot')
关于python - 使用 PyDot 排列点图的头部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20910596/
我需要在给定的列表上生成排列。我设法这样做 let rec Permute (final, arr) = if List.length arr > 0 then for x i
我正在尝试运行我的代码,以便它打印循环排列,尽管我目前只能让它执行第一个排列。它正确运行到我标记的点,但我看不出出了什么问题。我认为 while 循环中没有中断,但我不确定。确实需要一些帮助。 pac
我正在尝试计算不包含连续字母的排列数。我的代码通过了像“aabb”(答案:8)和“aab”(答案:2)这样的测试,但没有通过像“abcdefa”这样的情况(我的答案:2520;正确答案:3600)。这
比赛在这 B.排列 前言: 笛卡尔树上 dp?这名字很妙啊,但其实不需要笛卡尔树,只不过利用了笛卡尔树的定义 一个性质:我们设一个区间 \([l,r]\) 中的最大值的位置为 \(pos\),
我正在尝试使用 dplyr 的 arrange 根据条件对字符串进行排序。我想在一列上排列,但如果第二列等于一个值,则按升序排列,如果第二列等于另一个值,则按降序排列。 我发现了几个类似的问题(其中一
在 R 中,我使用 dplyr更具体地说 arrange() . 不知何故 arrange功能没有按预期工作。 在下面的示例中,我首先存储列的名称,然后将此变量作为参数传递给名为“my_functio
以下是我的 main.qml : Window { id: window visible: true width: 800 height: 480 title:
很难用谷歌搜索这个问题,因为我不确定这些概念叫什么,并且所有“两个数组/组的组合”SO 帖子都没有给我我期望的输出。 数组示例: var array1 = ['Bob', 'Tina']; var a
实现以下目标的最佳方法是什么?我有两个列表: val l1 = List("a", "b") val l2 = List(1, 2) 我想生成这个: List ( List(('a', 1)
我知道互联网上有很多针对我的具体问题的解决方案,但我一直在尝试以特定的方式解决它,但它不起作用,我真的无法理解出了什么问题。就我而言,我只想打印排列。这是我的代码: a = "abc"; functi
我有这样的代码来创建排列: --unique permutation perm :: [t] -> [[t]] perm [] = [[]] perm (x:xs) = [(y:zs) | (y,ys
有没有比使用基本公式 n!/(n-r)! 更好的方法?就像我们对 nCr(组合) nCr = (n-l)Cr + (n-1)C(r-1) 一样? 最佳答案 这样怎么样:nPr = (n−1)Pr +
此问答的动机是 How to build permutation with some conditions in R . 到目前为止,已经有一些很好的 R 软件包,例如 RcppAlgos 和 arr
我正在修改一本书中的排列示例。以下代码按预期工作。 perms([]) -> [[]]; perms(L) -> [[H|T] || H []; 它返回一个空列表。当我替换时,我得到了这个。
大约一周前,我问了一个关于帮助我解决这个问题的问题 Java permutations ,打印排列方法有问题。我已经整理了我的代码,并有一个现在可以工作的工作示例,尽管如果 5 位于数组中的第五个位置
我有一个包含重复元素的列表,即orig = [1,1,1,2,2,3]。 我想创建一个derangement b = f(orig),使得 b 中的每个位置值都与 orig 中的值不同: b[i] !
我想生成一个 array a 的排列而且我不想使用实用功能,例如 java.util.Collections() . 排列应该是随机的,并且每个排列都应该有可能发生 - 但不需要均等分布的概率。 以下
我有一个作业:用户输入一个字符串,例如 ABCD,程序必须给出所有排列。我不希望整个代码只是一个提示。这是我到目前为止在他们那里得到的,我没有得到任何实现。 以ABCD为例: 在本例中获取字符串长度的
我目前正在编写一个使用 itertools 的程序,其中的一部分似乎无法正常运行。我希望确定排列函数输出列表长度的输入等于它生成输出的列表长度。换句话说,我有 import itertools b =
我有一个列表 x=[1,2,3,4,5] 并且想查看这个列表的不同排列,一次取两个数字。 x=[1,2,3,4,5] from itertools import permutations y=list
我是一名优秀的程序员,十分优秀!