def test_plot_retro_path(): Q_hat = pd.DataFrame([ [0.0, 0.0], [0.0, 0.5], [0.5, 0.0]], columns=['x', 'y']) edges = {0: {1, 2}, 1: set(), 2: set()} retrofitting.plot_retro_path(Q_hat, edges)
# # To get a feel for what's happening, it's helpful to visualize the changes that occur in small, easily understood VSMs and graphs. The function `retrofitting.plot_retro_path` helps with this. # In[4]: Q_hat = pd.DataFrame([[0.0, 0.0], [0.0, 0.5], [0.5, 0.0]], columns=['x', 'y']) Q_hat # ### Only node 0 has outgoing edges # In[5]: edges_0 = {0: {1, 2}, 1: set(), 2: set()} _ = retrofitting.plot_retro_path(Q_hat, edges_0) # ### All nodes connected to all others # In[6]: edges_all = {0: {1, 2}, 1: {0, 2}, 2: {0, 1}} _ = retrofitting.plot_retro_path(Q_hat, edges_all) # ### As before, but now 2 has no outgoing edges # In[7]: edges_isolated = {0: {1, 2}, 1: {0, 2}, 2: set()}