networkx / website

Website source code for NetworkX.
http://networkx.org/
8 stars 13 forks source link

Suggestion for the sets documentation #3

Closed JBPressac closed 9 years ago

JBPressac commented 9 years ago

Hello, I would like to suggest to clarify the fact that the sets function returns an alpha-numerical ordered list of nodes and thus not the order in which the nodes had been declared. This could be usefull to understand why when you try to display the adjacency matrix of a davis_southern_women_graph graph, for instance, the rows and columns are not ordered in the way they are usually displayed in the publications and created by NetworkX.

bhaffiliations pdf - adobe reader_2014-12-04_17-22-39

Source p.2 of Borgatti, S.P. and Halgin, D. In press. “Analyzing Affiliation Networks”. In Carrington, P. and Scott, J. (eds) The Sage Handbook of Social Network Analysis. Sage Publications.

DSW = nx.davis_southern_women_graph()
"""
women_DSW is not ordered the same way than in the S. Borgatti publication
"""
women_DSW, meetings_DSW = bipartite.sets(DSW)
"""
so the resulting matrix does even not look like in the publication unless you provide again the list of 
women and events 
"""
bipartite.biadjacency_matrix(DSW,women_DSW,meetings_DSW)

Thanks,

hagberg commented 9 years ago

This request should be made over at the source code repository. I made a PR there networkx/networkx#1332 that updates the Davis Club example.