networkcommons.visual.NetworkXVisualizer

class networkcommons.visual.NetworkXVisualizer(network, color_by='effect')

An advanced visualizer that extends NetworkVisualizerBase with additional features.

color_by

Attribute to color edges by.

Type:

str

edge_colors

Edge colors used for visualization.

Type:

dict

__init__(network, color_by)

Initializes the visualizer with a network and color attribute.

set_custom_edge_colors(custom_edge_colors)

Sets custom colors for edges.

color_nodes()

Colors nodes based on their type.

color_edges()

Colors edges based on a specified attribute.

visualize_network_default(network, source_dict, target_dict, prog, custom_style)

Visualizes the network using default styles.

visualize_network_sign_consistent(network, source_dict, target_dict, prog, custom_style)

Visualizes the network with sign consistency.

visualize_network(network, source_dict, target_dict, prog, network_type, custom_style)

Main function for network visualization based on network type.

visualize(output_file, render, highlight_nodes, style)

Visualizes the network and saves or shows the plot.

Methods

adjust_node_labels([wrap, truncate, ...])

Adjust node labels using the adjust_node_name function.

color_edges()

Colors edges based on a specified attribute.

color_nodes()

Colors nodes based on their type.

set_custom_edge_colors(custom_edge_colors)

Sets custom colors for edges.

set_custom_style([custom_style])

Sets a custom style for the visualizer, merging it with the default style.

visualize([source_dict, target_dict, ...])

Visualizes the network and saves or shows the plot.

visualize_network(source_dict, target_dict)

Main function for network visualization based on network type.

visualize_network_default(source_dict, ...)

Visualizes the network using default styles.

visualize_network_sign_consistent(...[, ...])

Visualizes the network considering sign consistency.

visualize_network_simple(source_dict, ...[, ...])

Visualizes the graph using basic settings and styling.

Methods

adjust_node_labels([wrap, truncate, ...])

Adjust node labels using the adjust_node_name function.

color_edges()

Colors edges based on a specified attribute.

color_nodes()

Colors nodes based on their type.

set_custom_edge_colors(custom_edge_colors)

Sets custom colors for edges.

set_custom_style([custom_style])

Sets a custom style for the visualizer, merging it with the default style.

visualize([source_dict, target_dict, ...])

Visualizes the network and saves or shows the plot.

visualize_network(source_dict, target_dict)

Main function for network visualization based on network type.

visualize_network_default(source_dict, ...)

Visualizes the network using default styles.

visualize_network_sign_consistent(...[, ...])

Visualizes the network considering sign consistency.

visualize_network_simple(source_dict, ...[, ...])

Visualizes the graph using basic settings and styling.