docs: def plot_tree3d(ax, tree,
                  diameter_scale=_DIAMETER_SCALE, linewidth=_LINEWIDTH,
                  color=None, alpha=_ALPHA):
      '''Generates a figure of the tree in 3d.
  
      If the tree contains one single point the plot will be empty \
      since no segments can be constructed.
  
      Args:
          ax(matplotlib axes): on what to plot
          tree(neurom.core.Tree or neurom.core.Neurite): plotted tree
          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
      '''
      segs = [(s[0][COLS.XYZ], s[1][COLS.XYZ]) for s in iter_segments(tree)]
  
      linewidth = _get_linewidth(tree, diameter_scale=diameter_scale, linewidth=linewidth)
      color = _get_color(color, tree.type)
  
      collection = Line3DCollection(segs, color=color, linewidth=linewidth, alpha=alpha)
      ax.add_collection3d(collection)
  
      _update_3d_datalim(ax, tree)