cluster.py 文件源码

python
阅读 49 收藏 0 点赞 0 评论 0

项目:PyMaid 作者: schlegelp 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号