plotutil.py 文件源码

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

项目:hylaa 作者: stanleybak 项目源码 文件源码
def __init__(self, plotman):
        self.plotman = plotman
        self.axes = plotman.axes
        self.mode_colors = plotman.mode_colors

        # create a blank invariant violation polys
        self.inv_vio_polys = collections.PolyCollection([], animated=True, alpha=0.7, edgecolor='red', facecolor='red')
        self.axes.add_collection(self.inv_vio_polys)

        # create a blank currently-tracked set of states poly
        self.cur_state_line2d = Line2D([], [], animated=True, color='k', lw=2, mew=2, ms=5, fillstyle='none')
        self.axes.add_line(self.cur_state_line2d)

        self.parent_to_polys = OrderedDict()
        self.parent_to_markers = OrderedDict()

        self.waiting_list_mode_to_polys = OrderedDict()
        self.aggregation_mode_to_polys = OrderedDict()

        self.trace = collections.LineCollection(
            [[(0, 0)]], animated=True, colors=('k'), linewidths=(3), linestyle='dashed')
        self.axes.add_collection(self.trace)

        if plotman.settings.extra_lines is not None:
            lines = plotman.settings.extra_lines
            self.extra_lines_col = collections.LineCollection(
                lines, animated=True, colors=('gray'), linewidths=(2), linestyle='dashed')
            self.axes.add_collection(self.extra_lines_col)
        else:
            self.extra_lines_col = None

        self.freeze_attrs()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号