szhorvat / IGraphM

IGraph/M is the igraph interface for Mathematica
http://szhorvat.net/mathematica/IGraphM
Other
91 stars 17 forks source link

IGVertexMap and VertexShapeFunction #87

Closed szhorvat closed 5 years ago

szhorvat commented 5 years ago

IGVertexMap with VertexShapeFunction leads to pinking.

g = CompleteGraph[4, VertexSize -> Large] // 
  IGVertexMap[If[OddQ[#], "Square", "Circle"] &, 
   VertexShapeFunction -> VertexList]

image

Uncompress@Compress[g]

image

IGEdgeMap is not affected:

IGEdgeMap["DashedLine" &, EdgeShapeFunction -> EdgeList, 
 CompleteGraph[4]]

The underlying cause:

g = CompleteGraph[4, VertexSize -> Large]
result = SetProperty[g, 
  Properties -> {1 -> {VertexShapeFunction -> "Square"}}]

Uncompress@Compress[result]

This looks like a bug in Mathematica but it should be worked around.

szhorvat commented 5 years ago

Fixed by bf132c2b6984e15ada83af9f85db4c6408e6a6b7