grapher.py 文件源码

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

项目:Smart-Grid-Analytics 作者: Merit-Research 项目源码 文件源码
def clear(self):
        self.graph.cla()
        zero = dt.datetime.fromtimestamp(0)
        one = dt.datetime.fromtimestamp(1)
        x, y = [zero, one], [-1, -1]
        self.graph.set_xlim(zero, one)
        self.graph.set_ylim(0, 1)
        self.power_line, = self.graph.plot(x, y, color='red')
        self.graph.xaxis.set_major_formatter(DateFormatter("%Y-%m-%d %H:%M:%S"))
        self.graph.xaxis.set_major_locator(LinearLocator(numticks=6))
        plt.setp(self.graph.get_xticklabels(), rotation=10)
        self.graph.set_ylabel("Power (kW)")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号