tick_locators.py 文件源码

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

项目:yt 作者: yt-project 项目源码 文件源码
def _set_numticks(self):
        self.numticks = 11  # todo; be smart here; this is just for dev

    # def view_limits(self, vmin, vmax):
    #     'Try to choose the view limits intelligently'

    #     if vmax<vmin:
    #         vmin, vmax = vmax, vmin

    #     if vmin==vmax:
    #         vmin-=1
    #         vmax+=1

    #     exponent, remainder = divmod(math.log10(vmax - vmin), 1)

    #     if remainder < 0.5:
    #         exponent -= 1
    #     scale = 10**(-exponent)
    #     vmin = math.floor(scale*vmin)/scale
    #     vmax = math.ceil(scale*vmax)/scale

    #     return mtransforms.nonsingular(vmin, vmax)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号