#NEWLINE# def __axis_tempo( data , n_ticks , horiz , sr = 22050 , hop_length = 512 , tmin = 16 , tmax = 240 , **_kwargs ) : #NEWLINE# #INDENT# 'Tempo axes' #NEWLINE# ( n , ticker , labeler ) = __get_shape_artists ( data , horiz ) #NEWLINE# nmin = min ( ( n - 1 ) , ( ( sr * 60.0 ) / ( hop_length * tmin ) ) ) #NEWLINE# nmax = max ( 1 , ( ( sr * 60.0 ) / ( hop_length * tmax ) ) ) #NEWLINE# positions = np . logspace ( np . log2 ( nmin ) , np . log2 ( nmax ) , num = n_ticks , endpoint = True , base = 2 ) . astype ( int ) #NEWLINE# tempi = [ '{:.1f}' . format ( ( ( 60 * float ( sr ) ) / ( hop_length * t ) ) ) for t in positions ] #NEWLINE# ticker ( positions , tempi ) #NEWLINE# labeler ( 'Tempo (BPM)' )