profile_plotter.py 文件源码

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

项目:yt 作者: yt-project 项目源码 文件源码
def show(self):
        r"""This will send any existing plots to the IPython notebook.

        If yt is being run from within an IPython session, and it is able to
        determine this, this function will send any existing plots to the
        notebook for display.

        If yt can't determine if it's inside an IPython session, it will raise
        YTNotInsideNotebook.

        Examples
        --------

        >>> import yt
        >>> ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
        >>> pp = ProfilePlot(ds.all_data(), 'density', 'temperature')
        >>> pp.show()

        """
        if "__IPYTHON__" in dir(builtins):
            from IPython.display import display
            display(self)
        else:
            raise YTNotInsideNotebook
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号