Before running InteractiveIGraph firstly you should create simple igraph object.
Later on, you must be sure you are running correct screen device.
InteractiveIGraph works only on window
and X11(type = "Xlib") screen devices,
therefore if working with RStudio (or smth.) you should activate one of the correct devices.
After running the function, you can play around by using computer mouse directly on screen device.
You can grab vertex (or group if them), move it,
change any attributes. You may even create, or delete vertices and edges.
If you want to save the results, press key - it will dump object to text file.
More over you can save the picture by presing or
press , that stands for 'quite' - it will end the interaction program and assign the last value of the object to predefined variable.
See examples.
Keyboard is active if the graphical device is active.
To apply the command you just need to know a hot-key. While ruining InteractiveIGraph
you may press that stands for 'menu' and all the list will be printed in the console.
The list of commands are kept in CommandList.
This list might by modified by user, therefore,
any functionality might my easily added by creating new hot-key in the CommandList.
You can find out almost all the commands by exploring CommandList (run function PrintCommandList).
For example if you want to see minimum.spanning.tree of your graph you should pres button while running
InteractiveIGraph. You may see how this is realized with the command CommandList[["t"]]
There are some special features, that user might found interesting:
- active vertices. Vertices may by active / not active. hot-key: a, A, ctrl-A.
- grouping. Vertices might be grouped interactively. hot-key: g, G, ctrl-G.
- blocking. Groups might be 'closed' in blocks,
Isolating huge amount of vertices that not actual in the moment.
hot-key: b (while any groups is active).
It should be notice that there are several modes, that influence the output of commands.
All modes might by seen in console by pressing .
Main modes are:
- select. The
select mode enables select multiple vertices(edges) by multiple clicking.
It means, vertices are not unselected after new click.
- ActiveObject. If any object is labeled as active (in bottom menu), then special commands might be applied to it.
For example
delete, block.
- ViewObject. If it is in object's view mode it is labeled in the 'main' of the graph.
Special treatment of the commands might by applied. For example, if it is view mode of group,
then selecting vertices and pressing "g" will join or disjoin vertices to group (instead of creating new group.)
- Input. Specifies case, then system is waiting for some kind of input, for example command.
- AllEdges. By default, if there are more then one vertices selected no edge indexes are shown.
This mode forces to show active vertex edges.
If you are in the mode that you don't want to be, press - it will restore default.
In ... you may specify many parameters form igraph, namely:
'layout' 'xlim', 'ylim', 'main', 'sub', 'axes', 'xlab', 'ylab' , 'add'.
User may specify the margins with parameter 'mar'.
Any vertex or edge parameters should be add via V and E.
User may also specify its own Adjustment Functions, namely
'PlotAdjustment', 'BottomMenuAdjustment', 'ExtraInfo'.
And there is special attribute 'MainMenu' - this allows to create any menu that show by pressing right mouse button.
By default a very simple Menu is created. Menu is a list with special structure you can explore it with
graph$Menu$MenuList$MainMenu. Unfortunately, this part is in developing stage -
it is now OK to make it work, but not to be user-friendly.