This paper explores the robustness of cooperation in a spatially organised population of agents participating in the N-player prisoner's dilemma. The agents are placed on graphs exhibiting different properties and the relationship between these properties and the robustness of cooperation is explained. In particular, this paper analyses the effect the clustering coefficient and the average node degree has on cooperation. In addition to theoretical analysis, rigorous experiments, involving the creation of graphs exhibiting certain desirable properties, are undertaken to explore the effect of the graph properties on the ability of cooperation to resist invasion. Both the theoretical and the experimental results show that when the average degree is high, the population loses the ability to maintain cooperation in the presence of defectors. However, for graphs with lower average node degree, a higher clustering coefficient will guarantee a relatively high cooperation rate.