jaxley.io.graph.vis_compartment_graph

jaxley.io.graph.vis_compartment_graph#

vis_compartment_graph(comp_graph, ax=None, font_size=7.0, node_size=150.0, arrowsize=10.0, comp_color='r', branchpoint_color='orange')[source]#

Visualize a compartment graph.

Parameters:
  • comp_graph (DiGraph) – A compartment graph generated with build_compartment_graph() or with to_graph().

  • ax – Matplotlib axis.

  • font_size (float) – The fontsize for the node names.

  • node_size (float) – The size of each node.

  • arrowsize (float) – The size of the arrow.

  • comp_color (str) – The color of the compartments.

  • branchpoint_color (str) – The color of the compartments.

Example usage#

from jaxley.io.graph import to_graph, vis_compartment_graph
cell = jx.read_swc("path_to_swc.swc", ncomp=1)
comp_graph = to_graph(cell)
vis_compartment_graph(comp_graph)