edgegraph.output.pyvis.pyvis_render_customizable#
- edgegraph.output.pyvis.pyvis_render_customizable(uni, rvfunc=None, refunc=None, show_buttons_filter=None)#
Convert a given Universe to a PyVis network, suitable for further use within PyVis. Then, apply a flag to it to cause the display of a customization UI when the network is shown in HTML.
Note
This function is very similar to
make_pyvis_net(). In fact, 3 out of the 4 arguments given here are passed directly through to it.In addition to the network created by
make_pyvis_net(), this function sets a flag that displays real-time adjustable options to the viewer of the graph. This can include sliders to control node physics, colors, label visiblity, selection, and more.- Parameters:
uni (Universe) – The universe to use as input.
rvfunc (Callable) – A callable object to provide the label for any given vertex being added to the network (short for “(R)ender (V)ertex (Func)tion”). If supplied, it must take one argument (an instance of
Vertexor subclass thereof), and must return astr. If not provided,hex(id(vert))will be used.refunc (Callable) – A callable object to provide the label for any given edge being added to the network (short for “(R)ender (E)dge (Func)tion”). If supplied, it must take one argument (an instance of
TwoEndedLink, or subclass thereof), and must return astr. If not provided, edges will not be labelled.show_buttons_filter –
Sets the widgets that will be available in the customization UI displayed by Pyvis. May be a list of strings,
TrueorNoneto display all.See also
pyvis.network.Network.show_buttons(), which includes a list of options passable toshow_buttons_filter.
- Returns:
A
pyvis.network.Networkinstance containing the data found in the given universe.- Return type: