neat.MorphTree.colorXAxis

MorphTree.colorXAxis(ax, cmap, addScalebar=1, borderpad=- 1.8)[source]

Color the x-axis of a plot according to the morphology.

!!! Has to be called after all lines are plotted !!!

Furthermor, node colors have to be set first. This can be done with MorphTree.setNodeColors() or manually by adding a ‘color’ entry to the MorphNode.content dictionary

Parameters
  • ax (matplotlib.axes.Axes instance) – the ax object of which the x-axis will be colored

  • cmap (matplotlib.colors.Colormap instance) – Colormap that determines the color of each branch

  • sizex (float) – Size of scalebar (in micron). If set to None, no scalebar is plotted.

  • borderpad (float) – Borderpad of scalebar