I have some code that creates a graph. However, I don't understand how to let the x and y axes appear. I have tried ax.tick_params(left=True, bottom=True, labelleft=True, labelbottom=True)
but it doesn't work.
My code
import networkx as nx
import matplotlib.pyplot as plt
Adj = np.random.randint(0,2,(5,5))
x = np.random.uniform(0,1,5)
y = np.random.uniform(0,1,5)
# convert to list of tuples
M_pos = list(zip(x,y))
# give each neuron a number, and put in a dictionary
nums = list(range(0,5))
pos_dict = dict(zip(nums,M_pos))
# construct the graph from the neuron positions and adjacency matrix
GR = nx.from_numpy_matrix(Adj, pos_dict);
figure(figsize=(10, 5))
plt.title('Neuron spatial location')
#nx.draw_networkx_labels(GR, pos_dict)
nx.draw(GR, pos_dict, node_size=40, node_color='b');