tumourkit.postprocessing.draw_graph.draw_graph
- tumourkit.postprocessing.draw_graph.draw_graph(orig: ndarray, graph: DGLGraph, x: ndarray, y: ndarray, labels: ndarray, type_info: Dict[str, Tuple[str, List[int]]], save_path: str) ndarray
Draws a graph into an image using Matplotlib and NetworkX.
- Parameters:
orig (np.ndarray) – The original data used to construct the graph.
graph (DGLHeteroGraph) – The graph object to be visualized.
x (np.ndarray) – Node features used for plotting.
y (np.ndarray) – Node coordinates used for plotting.
labels (np.ndarray) – Node labels used for visualization.
type_info (Dict[str, Tuple[str, List[int]]]) – A dictionary containing type information as keys and RGB tuples as values.
save_path (str) – The file path to save the resulting graph visualization.
- Returns:
The image of the graph.
- Return type:
np.ndarray