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)
评论列表
文章目录