profile_plotter.py 文件源码

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

项目:yt 作者: yt-project 项目源码 文件源码
def _initialize_instance(cls, obj, profiles, labels, plot_specs, y_log):
        from matplotlib.font_manager import FontProperties
        obj._font_properties = FontProperties(family='stixgeneral', size=18)
        obj._font_color = None
        obj.profiles = ensure_list(profiles)
        obj.x_log = None
        obj.y_log = {}
        if y_log is not None:
            for field, log in y_log.items():
                field, = obj.profiles[0].data_source._determine_fields([field])
                obj.y_log[field] = log
        obj.y_title = {}
        obj.label = sanitize_label(labels, len(obj.profiles))
        if plot_specs is None:
            plot_specs = [dict() for p in obj.profiles]
        obj.plot_spec = plot_specs
        obj.plots = PlotContainerDict()
        obj.figures = FigureContainer(obj.plots)
        obj.axes = AxesContainer(obj.plots)
        obj._setup_plots()
        return obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号