def _make_trace(neuron, plane):
for neurite in iter_neurites(neuron):<EOL><INDENT>segments = list(iter_segments(neurite))<EOL>segs = [(s[<NUM_LIT:0>][COLS.XYZ], s[<NUM_LIT:1>][COLS.XYZ]) for s in segments]<EOL>coords = dict(x=list(chain.from_iterable((p1[<NUM_LIT:0>], p2[<NUM_LIT:0>], None) for p1, p2 in segs)),<EOL>y=list(chain.from_iterable((p1[<NUM_LIT:1>], p2[<NUM_LIT:1>], None) for p1, p2 in segs)),<EOL>z=list(chain.from_iterable((p1[<NUM_LIT:2>], p2[<NUM_LIT:2>], None) for p1, p2 in segs)))<EOL>color = TREE_COLOR.get(neurite.root_node.type, '<STR_LIT>')<EOL>if plane.lower() == '<STR_LIT>':<EOL><INDENT>plot_fun = go.Scatter3d<EOL><DEDENT>else:<EOL><INDENT>plot_fun = go.Scatter<EOL>coords = dict(x=coords[plane[<NUM_LIT:0>]], y=coords[plane[<NUM_LIT:1>]])<EOL><DEDENT>yield plot_fun(<EOL>line=dict(color=color, width=<NUM_LIT:2>),<EOL>mode='<STR_LIT>',<EOL>**coords<EOL>)<EOL><DEDENT>
Create the trace to be plotted