1 | initial version |
I did this little workaround:
def g3dPlot(g,colorsDic) :
plt=Graphics()
locationDic=g.get_pos(dim=3)
for edge in g.edges(sort=True) :
colorV=colorsDic.get(str([edge[0],edge[1]]))
vStart=vector(locationDic.get(edge[0]));vEnd=vector(locationDic.get(edge[1]))
plt+=arrow3d(vStart,vEnd,width=2,radius=0.02,color=colorV )
posText=(vEnd-vStart)/2 + vStart + shiftV
plt+= text3d(edge[2],posText, fontsize='100%', fontweight=50,color=colorV)
return plt
gColorPlt=g3dPlot(g,simplex1ColorDic)
gColorPlt=addAxis(gColorPlt,textToPlt,xBound,yBound,zBound,widthA,radiusA)
gColorPlt.show()
2 | No.2 Revision |
I did this little workaround:
def g3dPlot(g,colorsDic) :
plt=Graphics()
locationDic=g.get_pos(dim=3)
for edge in g.edges(sort=True) :
colorV=colorsDic.get(str([edge[0],edge[1]]))
vStart=vector(locationDic.get(edge[0]));vEnd=vector(locationDic.get(edge[1]))
plt+=arrow3d(vStart,vEnd,width=2,radius=0.02,color=colorV )
posText=(vEnd-vStart)/2 + vStart + shiftV
plt+= text3d(edge[2],posText, fontsize='100%', fontweight=50,color=colorV)
return plt
gColorPlt=g3dPlot(g,simplex1ColorDic)
gColorPlt=addAxis(gColorPlt,textToPlt,xBound,yBound,zBound,widthA,radiusA)
gColorPlt.show()