neat.MorphTree.plot_2d_morphology¶
- MorphTree.plot_2d_morphology(ax, node_arg=None, cs=None, cminmax=None, cmap=None, use_radius=1, draw_soma_circle=1, plotargs={}, textargs={}, marklocs=[], loc_args={}, 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, soma_pos=None)[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.convert_node_arg_to_nodes
cs (dict {int: float}, None or 'node_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 inplotargs. 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 innode.contentwill result in an error.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
csare takenuse_radius (bool) – If
True, uses the swc radius for the width of the line segmentsdraw_soma_circle (bool) – If
True, draws the soma as a circle, otherwise doesn’t draw somaplotargs (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
loc_args (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)) – setaxlimits based on the morphologylims_margin (float) – the margin, as fraction of total width and height of tree, at which the limits are placed
soma_pos (np.ndarray of float (shape=(3,))) – translate the soma position the the given coordinates