Plotting.py 文件源码

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

项目:STEPS 作者: CNS-OIST 项目源码 文件源码
def addPatchSpecDist(self, title, mesh, sim, patch_id, spec_id, axis = "x", nbins = 20, y_range = None, **kwargs):
        """
        Add plot to display the distribution of species in a patch.

        Parameters:
            * title           Title of the plot
            * sim             STEPS solver
            * mesh            STEPS mesh
            * patch_id        ID of the patch
            * spec_id         ID of the species
            * axis            Spatial direction of the distribution
            * nbins           Number of bins for the data
            * y_range         Range of y axis
            * **kwargs        Other keywords that are supported by pygraph.GraphicsWindow class

        Return:
            pyqtgraph.PlotItem object
        """
        if title in self.updater:
            raise NameError('A Plot with name ' + title + " exists.")
        plot = self.addPlot(title = title)
        updater = PatchSpecDistUpdater(plot, mesh, sim, patch_id, spec_id, axis, nbins, y_range, **kwargs)
        self.updater[title] = updater
        return plot
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号