def plot3d(self, k=5, criterion='maxclust', **kwargs):
"""Plot neuron using :func:`pymaid.plot.plot3d`. Will only work if
instance has neurons attached to it.
Parameters
----------
k : {int, float}
criterion : {'maxclust','distance'}, optional
If `maxclust`, `k` clusters will be formed. If `distance`,
clusters will be created at threshold `k`.
**kwargs
will be passed to plot.plot3d()
see help(plot.plot3d) for a list of keywords
See Also
--------
:func:`pymaid.plot.plot3d`
Function called to generate 3d plot
"""
if 'neurons' not in self.__dict__:
module_logger.error(
'This works only with cluster results from neurons')
return None
cmap = self.get_colormap(k=k, criterion=criterion)
kwargs.update({'color': cmap})
return plotting.plot3d(self.neurons, **kwargs)
评论列表
文章目录