Mathematica GraphPlot and EdgeRenderingFunction

While I am waiting for completion, I would like to customize the part of the Mathematica graph that I am working on. The problem is that the nodes are at the top of the edges, I wonder if there is a way to undo this. In the image you can see that the arrows do not display correctly ...

I do GraphPlot[]with custom options VertexRenderingFunctionand EdgeRenderingFunction. It looks something like this:

Where are the arrows? Do you see them? Did you take my arrows http://img816.imageshack.us/img816/9703/graphbadarrows.png

As you can see, it would be cool, as they say, if the arrows were on top of the nodes. Is there an easy way to pull him in?

+3
source share
2 answers

, , - , .

, :

GraphPlot[Table[i -> Mod[3 i + 1, 9], {i, 0, 8}], 
 VertexRenderingFunction -> ({{White, Disk[#, 0.15]}, 
     Circle[#, 0.15]} &), DirectedEdges -> True, 
 EdgeRenderingFunction -> ({Arrowheads[{{.05, .8}}], Red, 
     Arrow[#]} &)]

.

+3

, GraphPlot , , GraphPlot. , , .

bg = GraphPlot[Table[i -> Mod[3 i + 1, 9],
  {i, 0, 8}], DirectedEdges -> True,
  VertexRenderingFunction -> (
  {{White, Disk[#, 0.15]}, Circle[#, 0.15]} &),
  EdgeRenderingFunction -> (Arrow[#1] &)]

Graphics :

  bg // InputForm

, . .

  MapAt[Reverse, bg, {1, 1}]

, Graphics, , .

+4

Source: https://habr.com/ru/post/1766592/


All Articles