def _filter_ticks(lims, fscale):
    'Create approximately spaced ticks between lims.'
    if (fscale == 'linear'):
        return (None, None)
    lims = np.array(lims)
    ticks = list()
    if (lims[1] > (20 * lims[0])):
        base = np.array([1, 2, 4])
    else:
        base = np.arange(1, 11)
    for exp in range(int(np.floor(np.log10(lims[0]))), (int(np.floor(np.log10(lims[1]))) + 1)):
        ticks += (base * (10 ** exp)).tolist()
    ticks = np.array(ticks)
    ticks = ticks[((ticks >= lims[0]) & (ticks <= lims[1]))]
    ticklabels = [(('%g' if (t < 1) else '%d') % t) for t in ticks]
    return (ticks, ticklabels)
Create approximately spaced ticks between lims.
def _filter_ticks(lims, fscale):
    
    if (fscale == 'linear'):
        return (None, None)
    lims = np.array(lims)
    ticks = list()
    if (lims[1] > (20 * lims[0])):
        base = np.array([1, 2, 4])
    else:
        base = np.arange(1, 11)
    for exp in range(int(np.floor(np.log10(lims[0]))), (int(np.floor(np.log10(lims[1]))) + 1)):
        ticks += (base * (10 ** exp)).tolist()
    ticks = np.array(ticks)
    ticks = ticks[((ticks >= lims[0]) & (ticks <= lims[1]))]
    ticklabels = [(('%g' if (t < 1) else '%d') % t) for t in ticks]
    return (ticks, ticklabels)