Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the IGGraphEditor command fail to return the modified embedding? #129

Open
lichengzhang1 opened this issue Aug 24, 2023 · 4 comments · May be fixed by #135
Open

Does the IGGraphEditor command fail to return the modified embedding? #129

lichengzhang1 opened this issue Aug 24, 2023 · 4 comments · May be fixed by #135
Assignees

Comments

@lichengzhang1
Copy link

lichengzhang1 commented Aug 24, 2023

Describe the bug
I would like to modify the graph embedding below (the original embedding is Tutte embedding). to make it more experiment-friendly. So I used the command IGGraphEditor but strangely, when I change its embedding and I press the Shift-Enter keys, the layout remains the same as before.

To Reproduce

Needs["IGraphM`"]
g=Graph[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}, {Null, SparseArray[Automatic, {27, 27}, 0, {1, {{0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108}, {{2}, {3}, {4}, {5}, {1}, {6}, {7}, {8}, {1}, {8}, {9}, {10}, {1}, {10}, {11}, {12}, {1}, {6}, {12}, {13}, {2}, {5}, {13}, {14}, {2}, {14}, {15}, {16}, {2}, {3}, {16}, {17}, {3}, {17}, {18}, {19}, {3}, {4}, {11}, {19}, {4}, {10}, {19}, {20}, {4}, {5}, {20}, {21}, {5}, {6}, {21}, {22}, {6}, {7}, {22}, {23}, {7}, {23}, {24}, {25}, {7}, {8}, {17}, {25}, {8}, {9}, {16}, {26}, {9}, {20}, {21}, {26}, {9}, {10}, {11}, {20}, {11}, {12}, {18}, {19}, {12}, {13}, {18}, {27}, {13}, {14}, {23}, {27}, {14}, {15}, {22}, {24}, {15}, {23}, {25}, {27}, {15}, {16}, {24}, {26}, {17}, {18}, {25}, {27}, {21}, {22}, {24}, {26}}}, Pattern}]}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, ImageSize -> {250, 250}, PlotRange -> All, PlotTheme -> "Monochrome", VertexCoordinates -> {{-0.07285390747630885, 0.1915930140350355}, {-0.07169289265236042, 0.07168190165534996}, {-0.17087532112234036, 0.21594273493105506}, {-0.08468972735478028, 0.2651225062280678}, {0.03584231122424563, 0.21362491332566919}, {0.07154112131054977, 0.12296675973124052}, {-0.04348798874311309, -0.13110142011533404}, {-0.24197079570056956, 0.10326925297045786}, {-0.23430176456538535, 0.3009200400606976}, {-0.13437481674709773, 0.2679886326580292}, {-0.12600590553457464, 0.291864891353234}, {-0.0055242796611399145, 0.3090434868659726}, {0.15020631072388155, 0.23089639267042822}, {0.17180875594643236, -0.024336168726485367}, {0.06950828866503721, -0.44985409878300137}, {-0.3435761069315615, -0.12189731460719944}, {-0.38173886209601593, 0.2473496899026259}, {-0.22866456206648947, 0.4413633372893496}, {-0.15592831297669565, 0.29902439811975995}, {-0.1290307650597249, 0.33532402840707903}, {0.1557810625456999, 0.4221024995030745}, {0.3376607478150308, 0.16489139812172846}, {0.32152114340326193, -0.2541014126435764}, {0.7071067811865475, -0.7071067811865475}, {-0.7071067811865475, -0.7071067811865475}, {-0.7071067811865475, 0.7071067811865475}, {0.7071067811865475, 0.7071067811865475}}, VertexSize -> {{0.02, 0.02}}, VertexStyle -> {GrayLevel[0.6]}}]
IGGraphEditor[g]

image

Version information

  • IGraph/M version: IGraph/M 0.6.5
  • Mathematica version: 13.3
  • OS version: windows 10
@lichengzhang1
Copy link
Author

lichengzhang1 commented Aug 24, 2023

I've noticed that when I move (or just click) the four vertices (or any one of them) on the external face, and then press Shift-Enter, the embedding of the graph adjusts accordingly. Otherwise, it keeps the original embedding. This is quite strange.

@szhorvat
Copy link
Owner

Can you have a look at this @kubaPod ?

@kubaPod
Copy link
Collaborator

kubaPod commented Aug 28, 2023

@szhorvat
Should not happen but I can reproduce it.
Not 100% why it does so it is probably something deeper than my code, will investigate more next week.
I can't reproduce it on most recent dev branch so the next, hopefully September, version should fix this.

@lichengzhang1 Yes, selecting a vertex is enough to fix it.

@kubaPod kubaPod self-assigned this Aug 28, 2023
@kubaPod
Copy link
Collaborator

kubaPod commented Mar 8, 2024

@szhorvat @lichengzhang1 I think it is already fixed in the editor branch

@kubaPod kubaPod linked a pull request Nov 26, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants