neat.MorphTree.plot2DMorphology

MorphTree.plot2DMorphology(ax, node_arg=None, cs=None, cminmax=None, cmap=None, use_radius=1, draw_soma_circle=1, plotargs={}, textargs={}, marklocs=[], locargs={}, marklabels={}, labelargs={}, cb_draw=0, cb_orientation='vertical', cb_label='', sb_draw=1, sb_scale=100, sb_width=5.0, set_lims=True, lims_margin=0.1)[source]

Plot the morphology projected on the x,y-plane

Parameters
  • ax (matplotlib.axes.Axes instance) – the ax object on which the plot will be drawn

  • node_arg – see documentation of MorphTree._convertNodeArgToNodes

  • cs (dict {int: float}, None or 'x_color') – If dict, node indices are keys and the float value will correspond to the plotted color. If None, the color of the tree will be the one specified in plotargs. Note that the dict does not have to contain all node indices. The ones that are not featured in the dict are plot in the color specified in plotargs. If ‘node_color’, colors will be those stored on the nodes. Note that choosing this option when there are nodes without ‘color’ as an entry in node.content will result in an error. Node colors can be set with MorphTree.setNodeColor()`

  • cminmax ((float, float) or None (default)) – The min and max values of the color scale (if cs is provided). If None, the min and max values of cs are used.

  • cmap (matplotlib.colors.Colormap instance) – colormap fram which colors in cs are taken

  • use_radius (bool) – If True, uses the swc radius for the width of the line segments

  • draw_soma_circle (bool) – If True, draws the soma as a circle, otherwise doesn’t draw soma

  • plotargs (dict) – kwargs for matplotlib.pyplot.plot. ‘c’- or ‘color’- argument will be overwritten when cs is defined. ‘lw’- or ‘linewidth’ argument will be multiplied with the swc radius of the node if use_radius is True.

  • textargs (dict) – text properties for various labels in the plot

  • marklocs (list of tuples, dicts or instances of neat.MorphLoc) – Location that will be plotted on the morphology

  • locargs (dict or list of dict) – kwargs for matplotlib.pyplot.plot for the location. Use only point markers and no lines! When it is a single dict all location will have the same marker. When it is a list it should have the same length as marklocs.

  • marklabels (dict {int: string}) – Keys are indices of locations in marklocs, values are strings that are used to annotate the corresponding locations

  • labelargs (dict) – text properties for the location annotation

  • cb_draw (bool) – Whether or not to draw a matplotlib.pyplot.colorbar() instance.

  • cb_orientation (string, 'vertical' or 'horizontal') – The colorbars’ orientation

  • cb_label (string) – The label of the colorbar

  • sb_draw (bool) – Whether or not to draw a scale bar

  • sb_scale (float) – Lenght of the scale bar (micron)

  • sb_width (float) – Width of the scale bar

  • set_lims (bool (optional, default True)) – set ax limits based on the morphology

  • lims_margin (float) – the margin, as fraction of total width and height of tree, at which the limits are placed