I am new to python and NetworkX and I'm facing trouble naming my ticks on the y-axis. I tried using plt.yticks() and ax.set_ylabels() but it does not label all the ticks.
This is the code:
fig, ax = plt.subplots(figsize=(10, 5))
plt.title('Transportation Network')
#nx.draw_networkx_labels(GR, pos_dict)
nx.draw(g, pos=node_positions, edge_color=edge_colors, node_size=40, node_color='black', ax=ax)
plt.xlabel('Time ( 1 epoch= 15 mins)')
plt.ylabel("Cities")
ax.set_axis_on()
ax.tick_params(left=True, bottom=True, labelleft=True, labelbottom=True)
ax.set_yticklabels(['C','B','A'])
plt.locator_params(axis="y", nbins=3)
I want it to look like this with A, B, and C on the 3 ticks in the y-axis.