#NEWLINE# def _update_ticks( self , renderer ) : #NEWLINE# #INDENT# coord_range = self . parent_map . get_coord_range ( ) #NEWLINE# ( tick_world_coordinates , self . _fl_spacing ) = self . locator ( * coord_range [ self . coord_index ] ) #NEWLINE# if self . ticks . get_display_minor_ticks ( ) : #NEWLINE# #INDENT# minor_ticks_w_coordinates = self . _formatter_locator . minor_locator ( self . _fl_spacing , self . get_minor_frequency ( ) , * coord_range [ self . coord_index ] ) #NEWLINE# #UNINDENT# frame = self . frame . sample ( settings . FRAME_BOUNDARY_SAMPLES ) #NEWLINE# self . ticks . clear ( ) #NEWLINE# self . ticklabels . clear ( ) #NEWLINE# self . lblinfo = [ ] #NEWLINE# self . lbl_world = [ ] #NEWLINE# transData = self . parent_axes . transData #NEWLINE# invertedTransLimits = transData . inverted ( ) #NEWLINE# for ( axis , spine ) in six . iteritems ( frame ) : #NEWLINE# #INDENT# pixel0 = spine . data #NEWLINE# world0 = spine . world [ : , self . coord_index ] #NEWLINE# world0 = self . transform . transform ( pixel0 ) [ : , self . coord_index ] #NEWLINE# axes0 = transData . transform ( pixel0 ) #NEWLINE# pixel1 = axes0 . copy ( ) #NEWLINE# pixel1 [ : , 0 ] += 2.0 #NEWLINE# pixel1 = invertedTransLimits . transform ( pixel1 ) #NEWLINE# world1 = self . transform . transform ( pixel1 ) [ : , self . coord_index ] #NEWLINE# pixel2 = axes0 . copy ( ) #NEWLINE# pixel2 [ : , 1 ] += ( 2.0 if ( self . frame . origin == 'lower' ) else ( - 2.0 ) ) #NEWLINE# pixel2 = invertedTransLimits . transform ( pixel2 ) #NEWLINE# world2 = self . transform . transform ( pixel2 ) [ : , self . coord_index ] #NEWLINE# dx = ( world1 - world0 ) #NEWLINE# dy = ( world2 - world0 ) #NEWLINE# ( dx , dy ) = ( ( - dy ) , dx ) #NEWLINE# if ( self . coord_type == 'longitude' ) : #NEWLINE# #INDENT# dx = wrap_angle_at ( dx , 180.0 ) #NEWLINE# dy = wrap_angle_at ( dy , 180.0 ) #NEWLINE# #UNINDENT# tick_angle = np . degrees ( np . arctan2 ( dy , dx ) ) #NEWLINE# normal_angle_full = np . hstack ( [ spine . normal_angle , spine . normal_angle [ ( - 1 ) ] ] ) #NEWLINE# reset = ( ( ( ( normal_angle_full - tick_angle ) % 360 ) > 90.0 ) & ( ( ( tick_angle - normal_angle_full ) % 360 ) > 90.0 ) ) #NEWLINE# tick_angle [ reset ] -= 180.0 #NEWLINE# w1 = spine . world [ : ( - 1 ) , self . coord_index ] #NEWLINE# w2 = spine . world [ 1 : , self . coord_index ] #NEWLINE# if ( self . coord_type == 'longitude' ) : #NEWLINE# #INDENT# w1 = wrap_angle_at ( w1 , self . coord_wrap ) #NEWLINE# w2 = wrap_angle_at ( w2 , self . coord_wrap ) #NEWLINE# w1 [ ( ( w2 - w1 ) > 180.0 ) ] += 360 #NEWLINE# w2 [ ( ( w1 - w2 ) > 180.0 ) ] += 360 #NEWLINE# #UNINDENT# self . _compute_ticks ( tick_world_coordinates , spine , axis , w1 , w2 , tick_angle ) #NEWLINE# if self . ticks . get_display_minor_ticks ( ) : #NEWLINE# #INDENT# self . _compute_ticks ( minor_ticks_w_coordinates , spine , axis , w1 , w2 , tick_angle , ticks = 'minor' ) #NEWLINE# #UNINDENT# #UNINDENT# text = self . formatter ( ( self . lbl_world * tick_world_coordinates . unit ) , spacing = self . _fl_spacing ) #NEWLINE# for ( kwargs , txt ) in zip ( self . lblinfo , text ) : #NEWLINE# #INDENT# self . ticklabels . add ( text = txt , ** kwargs )