New answers tagged

4

Quick summary The IGraph/M package has several functions to help with this (IGRewireEdges). The rewired network will not have the small world property unless the starting grid connects at least second neighbours as well. IGraph/M has a function to generate such a starting grid (IGMakeLattice). Easiest is to use IGraph/M! While this can be implemented ...


2

This is not an answer, but an extended comment. Dr.belisarius' answer, given in comment to the question, looks promising, but it can produce loops, Is this admissible? SeedRandom[1]; With[{g = GridGraph[{20, 20}]}, EdgeAdd[ EdgeDelete[g, #], Thread[UndirectedEdge[#[[All, 1]], RandomChoice[VertexList @ g, Length @ #]]]]& @ Pick[ ...


9

With Frame -> All, the automatic Spacings are weird. The automatic BaselinePosition is bad either way. It seems to be a good idea to include substitutes for as many of those options which are Automatic by default as possible: pic2 = ImageResize[ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}]; Grid[{{pic2}}, Alignment -> {Center, Center}, ...



Top 50 recent answers are included