plot.py 文件源码

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

项目:bonsu 作者: bonsudev 项目源码 文件源码
def UpdatePointLabel(self, mDataDict):
        """Updates the pointLabel point on screen with data contained in
            mDataDict.
            mDataDict will be passed to your function set by
            SetPointLabelFunc.  It can contain anything you
            want to display on the screen at the scaledXY point
            you specify.
            This function can be called from parent window with onClick,
            onMotion events etc.
        """
        if self.last_PointLabel != None:
            # compare pointXY
            if np.sometrue(mDataDict["pointXY"] != self.last_PointLabel["pointXY"]):
                # closest changed
                self._drawPointLabel(self.last_PointLabel)  # erase old
                self._drawPointLabel(mDataDict)  # plot new
        else:
            # just plot new with no erase
            self._drawPointLabel(mDataDict)  # plot new
        # save for next erase
        self.last_PointLabel = mDataDict
    # event handlers **********************************
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号