py3plex.visualization package

Submodules

py3plex.visualization.bezier module

py3plex.visualization.bezier.bezier_calculate_dfy(mp_y, path_height, x0, midpoint_x, x1, y0, y1, dfx, mode='upper')
py3plex.visualization.bezier.draw_bezier(total_size, p1, p2, mode='quadratic', inversion=False, path_height=2, linemode='both', resolution=0.1)

py3plex.visualization.colors module

py3plex.visualization.colors.RGB_to_hex(RGB)

[255,255,255] -> “#FFFFFF”

py3plex.visualization.colors.color_dict(gradient)

Takes in a list of RGB sub-lists and returns dictionary of colors in RGB and hex form for use in a graphing function defined later on

py3plex.visualization.colors.hex_to_RGB(hex)

“#FFFFFF” -> [255,255,255]

py3plex.visualization.colors.linear_gradient(start_hex, finish_hex='#FFFFFF', n=10)

returns a gradient list of (n) colors between two hex colors. start_hex and finish_hex should be the full six-digit color string, inlcuding the number sign (“#FFFFFF”)

py3plex.visualization.layout_algorithms module

py3plex.visualization.layout_algorithms.compute_force_directed_layout(g, layout_parameters=None, verbose=True, gravity=0.2, strongGravityMode=False, barnesHutTheta=1.2, edgeWeightInfluence=1, scalingRatio=2.0, forceImport=True)
py3plex.visualization.layout_algorithms.compute_random_layout(g)

py3plex.visualization.misc_tools module

py3plex.visualization.multilayer module

py3plex.visualization.multilayer.draw_multiedges(network_list, multi_edge_tuple, input_type='nodes', linepoints='-.', alphachannel=0.3, linecolor='black', curve_height=1, style='curve2_bezier', linewidth=1, invert=False, linmod='both', resolution=0.001)
py3plex.visualization.multilayer.draw_multilayer_default(network_list, display=True, node_size=10, alphalevel=0.13, rectanglex=1, rectangley=1, background_shape='circle', background_color='rainbow', networks_color='rainbow', labels=False, arrowsize=0.5, label_position=1, verbose=False, remove_isolated_nodes=False, axis=None, edge_size=1, node_labels=False, node_font_size=5, scale_by_size=False)

Core multilayer drawing method

Args: network_list (list): a list of networks display (bool): Whether to display or not (directly) node_size (int): size of the nodes alphalevel (float): transparency level rectanglex (float): size of rectangles (background) (horizontal part) rectangley (float): size of vertical parts of rectangles background_shape (string): Background shape, either circle or rectangle background_color (string): Background color networks_color (string): Color of individual networks labels (bool): Display labels? arrowsize (float): Sizes of individual arrows label_position (int): position of labels (diagonal right) verbose (bool): Verbose printout? remove_isolated_nodes (bool): Remove isolated nodes? axis (bools): axis are displayed edge_size (float): Size of edges node_labels (bool): Display node labels? node_font_size (int): Size of the font scale_by_size (bool): Scale nodes according to their degrees?

Returns

None

py3plex.visualization.multilayer.generate_random_multiedges(network_list, random_edges, style='line', linepoints='-.', upper_first=2, lower_first=0, lower_second=2, inverse_tag=False, pheight=1)
py3plex.visualization.multilayer.generate_random_networks(number_of_networks)
py3plex.visualization.multilayer.hairball_plot(g, color_list=None, display=False, node_size=1, text_color='black', node_sizes=None, layout_parameters=None, legend=None, scale_by_size=True, layout_algorithm='force', edge_width=0.01, alpha_channel=0.5, labels=None, draw=True, label_font_size=2)

A method for drawing force-directed plots Args: network (networkx): A network to be visualized color_list (list): A list of colors for nodes node_size (float): Size of nodes layout_parameters (dict): A dictionary of label parameters legend (bool): Display legend? scale_by_size (bool): Rescale nodes? layout_algorithm (string): What type of layout algorithm is to be used? edge_width (float): Width of edges alpha_channel (float): Transparency level. labels (bool): Display labels? label_font_size (int): Sizes of labels :returns: None

py3plex.visualization.multilayer.interactive_hairball_plot(G, nsizes, final_color_mapping, pos, colorscale='Rainbow')
py3plex.visualization.multilayer.onclick(event)
py3plex.visualization.multilayer.supra_adjacency_matrix_plot(matrix, display=False)

py3plex.visualization.polyfit module

py3plex.visualization.polyfit.draw_order3(networks, p1, p2)
py3plex.visualization.polyfit.draw_piramidal(networks, p1, p2)

Module contents