causalnex.plots.display_plot_ipython

causalnex.plots.display_plot_ipython(viz, output_filename, layout_kwargs=None)[source]

Displays a PyVis object using ipython. :type viz: Network :param viz: pyvis object to render. :type output_filename: str :param output_filename: write html to a given path, e.g. “./plot.html”. File as to end in “.html” :type layout_kwargs: Optional[Dict[str, Dict]] :param layout_kwargs: Dictionary to set the layout and physics of the graph.

Example:

layout_kwargs = {
       "physics": {
           "solver": "repulsion"
           },
       "layout": {
           "hierarchical": {
               "enabled": True
               }
           }
       }
Return type

IFrame

Returns

IPython IFrame object. Renders in a notebook.

Raises

ImportError – if IPython is not installed (optional dependency).