def plot_tree(ax, tree, plane='<STR_LIT>',<EOL>diameter_scale=_DIAMETER_SCALE, linewidth=_LINEWIDTH,<EOL>color=None, alpha=_ALPHA):
plane0, plane1 = _plane2col(plane)<EOL>segs = [((s[<NUM_LIT:0>][plane0], s[<NUM_LIT:0>][plane1]),<EOL>(s[<NUM_LIT:1>][plane0], s[<NUM_LIT:1>][plane1]))<EOL>for s in iter_segments(tree)]<EOL>linewidth = _get_linewidth(tree, diameter_scale=diameter_scale, linewidth=linewidth)<EOL>color = _get_color(color, tree.type)<EOL>collection = LineCollection(segs, color=color, linewidth=linewidth, alpha=alpha)<EOL>ax.add_collection(collection)<EOL>
Plots a 2d figure of the tree's segments

    Args:
        ax(matplotlib axes): on what to plot
        tree(neurom.core.Tree or neurom.core.Neurite): plotted tree
        plane(str): Any pair of 'xyz'
        diameter_scale(float): Scale factor multiplied with segment diameters before plotting
        linewidth(float): all segments are plotted with this width, but only if diameter_scale=None
        color(str or None): Color of plotted values, None corresponds to default choice
        alpha(float): Transparency of plotted values

    Note:
        If the tree contains one single point the plot will be empty
        since no segments can be constructed.