Info

This question is closed. Reopen it to edit or answer.

Is it possible to combine a gplot with a colorscale?

1 view (last 30 days)
Sjors
Sjors on 15 Apr 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I'm using glpot to create a lattice structure of nodes connected by springs. nx2 matrix Mloc specifies the x and y coordinates of the nodes and nxn matrix NB is the adjacency matrix showing whether or not nodes i and j are connected (non zero value) or unconnected (zero).
The nonzero values I use within the adjacency matrix are the values of the spring coefficients connecting the nodes i and j.
Now I am looking for a way to assign a colorscale to the lines connecting nodes i and j, based on the values of the spring coefficients as assigned in the adjacency matrix.
Is there a way to do so?

Answers (1)

Image Analyst
Image Analyst on 15 Apr 2014
See my attached demo.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!