Closed rittman closed 10 years ago
Not sure what you mean by this. Can you give example and references to some lines of code?
It would be good to specify the node label when plotting, not merely the index since they may not be in the correct order.
Test script here showing the problem:
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 29 12:24:22 2014
@author: tim
"""
from maybrain import mayBrainTools as mbt
from maybrain import mbplot as mbp
a = mbt.brainObj()
edges = [(0,2),
(0,4),
(0,6)]
locations = {0:(1,1,1),
2:(2,2,2),
4:(3,3,3),
6:(4,4,4)}
a.G.add_edges_from(edges)
for n in a.G.nodes():
a.G.node[n]['xyz'] = locations[n]
b = mbp.plotObj()
# this works:
b.plotBrainCoords(a)
# this works:
b.plotBrainCoords(a, nodes=[0,1,2,3])
# this does not work:
b.plotBrainCoords(a, nodes=[0,2,4,6])
Thanks fixed this for nodes. Do you need a similar function for edges?
Merged with the master, will write some test code for plotting and add that soon.
Test functions added to master.
Can we make the node labels for plotting the actual node names rather than an index? I don't want to update this before you do a merge with the master.