def view(input_file, plane, backend):
    '''A simple neuron viewer'''
    if backend == 'matplotlib':
        from neurom.viewer import draw
        kwargs = {
            'mode': '3d' if plane == '3d' else '2d',
        }
        if plane != '3d':
            kwargs['plane'] = plane
        draw(load_neuron(input_file), **kwargs)
    else:
        from neurom.view.plotly import draw
        draw(load_neuron(input_file), plane=plane)

    if backend == 'matplotlib':
        import matplotlib.pyplot as plt
        plt.show()
def view ( input_file , plane , backend ) : if backend == 'matplotlib' : from neurom . viewer import draw kwargs = { 'mode' : '3d' if plane == '3d' else '2d' , } if plane != '3d' : kwargs [ 'plane' ] = plane draw ( load_neuron ( input_file ) , ** kwargs ) else : from neurom . view . plotly import draw draw ( load_neuron ( input_file ) , plane = plane ) if backend == 'matplotlib' : import matplotlib . pyplot as plt plt . show ( )
A simple neuron viewer