graph - Legend in biograph plot in Matlab -
i have biograph
object, , want "color-code" edges , vertices.
is possible legends in biograph plot, similar ones in plot
.
my code this:
sys = sparse(from_nodes, to_nodes,1,s,s); systri = tril(sys + sys'); h = view(biograph(systri,[],'showarrows','off','showweights','off')); %% 1 of parts i'm coloring: set(h.nodes(node_list1),'color',[1 0.4 0.4]) fowedges = getedgesbynodeid(h,get(h.nodes(node_list1),'id')); revedges = getedgesbynodeid(h,get(h.nodes(fliplr(node_list1)),'id')); edges = [fowedges;revedges]; set(edges,'linecolor',[1 0 0]) set(edges,'linewidth',1.5)
now, this:
legend(h,'node list 1', 'node list 2');
does know if possible?
if want few times, manually.
you can try print figure biograph window, , add labels there.
Comments
Post a Comment