plotwindow.py 文件源码

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

项目:imagepy 作者: Image-Py 项目源码 文件源码
def draw(self):
        l, t, r, b = 35,35,15,35
        w = self.width - l - r
        h = self.height - t - b
        if self.data is None:return
        dc = wx.BufferedDC(wx.ClientDC(self), self.buffer)
        dc.Clear()

        left, low, right, high = self.extent
        self.draw_coord(dc, w, h, l, t, r, b)
        for xs, ys, c, lw in self.data:
            ys = h+t - (ys - low)*(h/(high-low))
            xs = l+(xs-left)*(1.0/(right-left)*w)
            pts = list(zip(xs, ys))
            dc.SetPen(wx.Pen(c, width=lw, style=wx.SOLID))
            dc.DrawLines(pts)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号