Assign colors to arrows in network graphs
See original GitHub issueHi @marcomusy
This is a follow up to my previous post here https://github.com/marcomusy/vedo/issues/182#issuecomment-667694798
I could color the edges based on edge weights
edg.cellColors(vals, cmap='viridis', vmin=vmin, vmax=vmax) #Blues_r
edg.addScalarBar3D(
title=' title',
titleFont='VictorMono',
labelFont='VictorMono',
c='k',
# titleXOffset=-1.5,
# titleYOffset=0
)
arrsv=[]
for i, j in G.edges():
dv = nodes[j]-nodes[i]
cn = (nodes[j]+nodes[i]) /2
v = dv/mag(dv)*1.5
ar = Arrow(cn-v, cn+v, s=.02, c='k')
arrsv.append(ar)
show(pts, graph, labs1, labs2, arrsv)
This assigns colors to the edges and the arrows are colored black. Instead, I’d like to assign colors to arrows (something like arrsv.cellColors inplace of edg.cellColors/ cmap) instead of edges and also generate scalarbar for the colors assigned to the arrows (e.g. arrsv.addScalarBar3D() ).
Could you please offer suggestions on how to do this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Visualizing Networks - Kelsey Andersen
Here, for example, we color the nodes and change the size and position of the labels using vertex.color = and vertex.label.dist = plot(mat3,...
Read more >How to Specify Arrowhead Color - Mathematica Stack Exchange
I've written this code and would like to color just the arrowheads (say) red. It would also be nice to select specific arrowheads...
Read more >Network visualization with R
The major ones are color, size, shape, and position. Network visualization controls. Honorable mention: arrows (direction) and labels (identification).
Read more >7 Network Visualization and Aesthetics - Bookdown
First, we can change the color, size, shapes and labels of nodes. Second, we can change the color, width, curviture and appearance of...
Read more >Unexpected arrow color behavior with semi-transparent edges ...
color is specified as rgb() with option alpha < 1 , the arrows become differentially colored.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
E.g.
yellow
Just specify the color right after the cmap: