@@ -19,7 +19,7 @@ Plots a network, from left to right.
19
19
- minorHybridEdgeColor: color for minor hybrid edges
20
20
- showEdgeNumber: if true, edges are labelled with the number used internally.
21
21
- showIntNodeLabel: if true, internal nodes are labelled with their names.
22
- Useful for hybrid nodes, which do have tags like '# H1'.
22
+ Useful for hybrid nodes, which do have tags like 'H1'.
23
23
- edgeLabel: dataframe with two columns: the first with edge numbers, the second with labels
24
24
(like bootstrap values) to annotate edges. empty by default.
25
25
- nodeLabel: dataframe with two columns: the first with node numbers, the second with labels
@@ -81,45 +81,45 @@ function Gadfly.plot(net::HybridNetwork; useEdgeLength=false::Bool,
81
81
ndf = prepareNodeDataFrame (net, nodeLabel, showNodeNumber,
82
82
showIntNodeLabel, labelnodes, node_x, node_y)
83
83
if (showTipLabel)
84
- push! (mylayers, layer (ndf[ndf[:lea ], [:x ,:y ,:name ]], y= " y" , x= " x" , label= " name" ,
84
+ push! (mylayers, layer (ndf[ndf[! , :lea ], [:x ,:y ,:name ]], y= " y" , x= " x" , label= " name" ,
85
85
Geom. label (position= :right ;hide_overlaps= true ))[1 ])
86
86
end
87
87
if (showIntNodeLabel)
88
- push! (mylayers, layer (ndf[.! ndf[:lea ], [:x ,:y ,:name ]], y= " y" , x= " x" , label= " name" ,
88
+ push! (mylayers, layer (ndf[.! ndf[! , :lea ], [:x ,:y ,:name ]], y= " y" , x= " x" , label= " name" ,
89
89
Geom. label (position= :above ;hide_overlaps= true ))[1 ])
90
90
end
91
91
if (showNodeNumber)
92
92
push! (mylayers, layer (ndf, y= " y" , x= " x" , label= " num" ,
93
93
Geom. label (position= :dynamic ;hide_overlaps= true ))[1 ])
94
94
end
95
95
if labelnodes
96
- push! (mylayers, layer (ndf[[:x ,:y ,:lab ]], y= " y" , x= " x" , label= " lab" ,
96
+ push! (mylayers, layer (ndf[! , [:x ,:y ,:lab ]], y= " y" , x= " x" , label= " lab" ,
97
97
Geom. label (position= :left ;hide_overlaps= false ))[1 ])
98
98
end
99
99
end
100
100
# data frame for edge annotations.
101
101
labeledges, edf = prepareEdgeDataFrame (net, edgeLabel, mainTree,
102
102
edge_xB, edge_xE, edge_yB, edge_yE)
103
103
if labeledges
104
- push! (mylayers, layer (edf[[:x ,:y ,:lab ]], y= " y" , x= " x" , label= " lab" ,
104
+ push! (mylayers, layer (edf[! , [:x ,:y ,:lab ]], y= " y" , x= " x" , label= " lab" ,
105
105
Geom. label (position= :above ;hide_overlaps= false ))[1 ])
106
106
end
107
107
if (showEdgeLength)
108
- push! (mylayers, layer (edf[[:x ,:y ,:len ]], y= " y" , x= " x" , label= " len" ,
108
+ push! (mylayers, layer (edf[! , [:x ,:y ,:len ]], y= " y" , x= " x" , label= " len" ,
109
109
Geom. label (position= :below ;hide_overlaps= false ))[1 ])
110
110
end
111
111
if (showGamma && net. numHybrids> 0 )
112
112
if ! mainTree
113
- push! (mylayers, layer (edf[edf[:hyb ] .& edf[:min ], [:x ,:y ,:gam ]], y= " y" , x= " x" ,label= " gam" ,
113
+ push! (mylayers, layer (edf[edf[! , :hyb ] .& edf[! , :min ], [:x ,:y ,:gam ]], y= " y" , x= " x" ,label= " gam" ,
114
114
Geom. label (position= :below ;hide_overlaps= true ),
115
115
Theme (point_label_color= minorHybridEdgeColor))[1 ])
116
116
end
117
- push! (mylayers, layer (edf[edf[:hyb ] .& .! edf[:min ],[:x ,:y ,:gam ]], y= " y" , x= " x" ,label= " gam" ,
117
+ push! (mylayers, layer (edf[edf[! , :hyb ] .& .! edf[! , :min ], [:x ,:y ,:gam ]], y= " y" , x= " x" ,label= " gam" ,
118
118
Geom. label (position= :below ;hide_overlaps= true ),
119
119
Theme (point_label_color= majorHybridEdgeColor))[1 ])
120
120
end
121
121
if (showEdgeNumber)
122
- push! (mylayers, layer (edf[[:x ,:y ,:num ]], y= " y" , x= " x" , label= " num" ,
122
+ push! (mylayers, layer (edf[! , [:x ,:y ,:num ]], y= " y" , x= " x" , label= " num" ,
123
123
Geom. label (position= :dynamic ;hide_overlaps= false ))[1 ])
124
124
end
125
125
0 commit comments