if self.parametres['seuil_ok'] : seuil = str(self.parametres['seuil'])
else : seuil = 'NULL'
-
+
+ if not self.parametres.get('edgecurved', False) :
+ ec = 'FALSE'
+ else :
+ ec = 'TRUE'
+
+ txt += """
+ edge.curved <- %s
+ """ % ec
+
cols = str(self.parametres['cols']).replace(')',', max=255)')
cola = str(self.parametres['cola']).replace(')',',max=255)')
vertex.label.color <- colm[membership(com)]
}
}
- coords <- plot.simi(graph.simi, p.type='%s',filename="%s", vertex.label = label.v, edge.label = label.e, vertex.col = vertex.col, vertex.label.color = vertex.label.color, vertex.label.cex=label.cex, vertex.size = vertex.size, edge.col = cola, leg=leg, width = width, height = height, alpha = alpha, movie = film, svg = svg)
+ coords <- plot.simi(graph.simi, p.type='%s',filename="%s", vertex.label = label.v, edge.label = label.e, vertex.col = vertex.col, vertex.label.color = vertex.label.color, vertex.label.cex=label.cex, vertex.size = vertex.size, edge.col = cola, leg=leg, width = width, height = height, alpha = alpha, movie = film, edge.curved = edge.curved, svg = svg)
save.image(file="%s")
""" % (type, self.filename, ffr(self.pathout['RData']))
'halo' : 0,
'tmpchi': self.tmpchi,
'fromprof' : True,
+ 'edge.curved' : True,
}
act = {}
tableau = copymatrix(tableau)
out <- list(graph = g.toplot, mat.eff = mat.eff, eff = eff, mat = mat.simi, v.label = v.label, we.width = we.width, we.label=we.label, label.cex = label.cex, layout = lo, communities = com, halo = halo, elim=vec)
}
-plot.simi <- function(graph.simi, p.type = 'tkplot',filename=NULL, communities = NULL, vertex.col = 'red', edge.col = 'black', edge.label = TRUE, vertex.label=TRUE, vertex.label.color = 'black', vertex.label.cex= NULL, vertex.size=NULL, leg=NULL, width = 800, height = 800, alpha = 0.1, cexalpha = FALSE, movie = NULL, svg = FALSE) {
+plot.simi <- function(graph.simi, p.type = 'tkplot',filename=NULL, communities = NULL, vertex.col = 'red', edge.col = 'black', edge.label = TRUE, vertex.label=TRUE, vertex.label.color = 'black', vertex.label.cex= NULL, vertex.size=NULL, leg=NULL, width = 800, height = 800, alpha = 0.1, cexalpha = FALSE, movie = NULL, edge.curved = TRUE, svg = FALSE) {
mat.simi <- graph.simi$mat
g.toplot <- graph.simi$graph
if (is.null(vertex.size)) {
}
par(pch=' ')
if (is.null(graph.simi$com)) {
- plot(g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo, edge.curved=FALSE)#, rescale = FALSE)
+ plot(g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo, edge.curved=edge.curved)#, rescale = FALSE)
} else {
if (graph.simi$halo) {
mark.groups <- communities(graph.simi$com)
} else {
mark.groups <- NULL
}
- plot(com, g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo, mark.groups = mark.groups, edge.curved=FALSE)
+ plot(com, g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo, mark.groups = mark.groups, edge.curved=edge.curved)
}
#txt.layout <- lo
txt.layout <- layout.norm(lo, -1, 1, -1, 1, -1, 1)
type_graph = 1
coeff_tv = True
first = False
+edgecurved = True
self.check_elab = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
fgSizer3.Add( self.check_elab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+ self.m_staticline39 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ fgSizer3.Add( self.m_staticline39, 0, wx.EXPAND |wx.ALL, 5 )
+
+ self.m_staticline40 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ fgSizer3.Add( self.m_staticline40, 0, wx.EXPAND |wx.ALL, 5 )
+
+ self.m_staticText321 = wx.StaticText( self.m_panel2, wx.ID_ANY, _(u"Edge curved"), wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText321.Wrap( -1 )
+ fgSizer3.Add( self.m_staticText321, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.check_curved = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+ fgSizer3.Add( self.check_curved, 0, wx.ALL, 5 )
+
self.m_staticline2914 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
fgSizer3.Add( self.m_staticline2914, 0, wx.EXPAND, 5 )
self.comcheck.SetValue(self.paramsimi['com'])
self.choix_com.SetSelection(self.paramsimi['communities'])
self.halo.SetValue(self.paramsimi['halo'])
+ self.check_curved.SetValue(self.paramsimi.get('edgecurved', True))
def ChangeCount(self, evt) :
self.textcount.SetValue('%i' % self.listcol.GetSelectedItemCount())
'com' :self.dial.comcheck.GetValue(),
'communities' : self.dial.choix_com.GetSelection(),
'halo' : self.dial.halo.GetValue(),
+ 'edgecurved' : self.dial.check_curved.GetValue(),
}
if 'cexfromchi' in self.parametres :
param['cexfromchi'] = self.dial.checkit.GetValue()