#NEWLINE# def _update_grid_lines( self ) : #NEWLINE# #INDENT# coord_range = self . parent_map . get_coord_range ( ) #NEWLINE# ( tick_world_coordinates , spacing ) = self . locator ( * coord_range [ self . coord_index ] ) #NEWLINE# tick_world_coordinates_values = tick_world_coordinates . value #NEWLINE# n_coord = len ( tick_world_coordinates_values ) #NEWLINE# n_samples = settings . GRID_SAMPLES #NEWLINE# xy_world = np . zeros ( ( ( n_samples * n_coord ) , 2 ) ) #NEWLINE# self . grid_lines = [ ] #NEWLINE# for ( iw , w ) in enumerate ( tick_world_coordinates_values ) : #NEWLINE# #INDENT# subset = slice ( ( iw * n_samples ) , ( ( iw + 1 ) * n_samples ) ) #NEWLINE# if ( self . coord_index == 0 ) : #NEWLINE# #INDENT# xy_world [ ( subset , 0 ) ] = np . repeat ( w , n_samples ) #NEWLINE# xy_world [ ( subset , 1 ) ] = np . linspace ( coord_range [ 1 ] [ 0 ] , coord_range [ 1 ] [ 1 ] , n_samples ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# xy_world [ ( subset , 0 ) ] = np . linspace ( coord_range [ 0 ] [ 0 ] , coord_range [ 0 ] [ 1 ] , n_samples ) #NEWLINE# xy_world [ ( subset , 1 ) ] = np . repeat ( w , n_samples ) #NEWLINE# #UNINDENT# #UNINDENT# pixel = self . transform . inverted ( ) . transform ( xy_world ) #NEWLINE# xy_world_round = self . transform . transform ( pixel ) #NEWLINE# for iw in range ( n_coord ) : #NEWLINE# #INDENT# subset = slice ( ( iw * n_samples ) , ( ( iw + 1 ) * n_samples ) ) #NEWLINE# self . grid_lines . append ( self . _get_gridline ( xy_world [ subset ] , pixel [ subset ] , xy_world_round [ subset ] ) )