#NEWLINE# def test_detached_axes( ) : #NEWLINE# #INDENT# ' Detached axes' #NEWLINE# coordinate_system = cartesius . CoordinateSystem ( bounds = ( ( - 10 ) , 10 , ( - 10 ) , 10 ) ) #NEWLINE# coordinate_system . add ( charts . Function ( ( lambda x : ( x * math . sin ( ( x * x ) ) ) ) , start = ( - 4 ) , end = 5 , step = 0.02 , color = ( 0 , 0 , 255 ) ) ) #NEWLINE# coordinate_system . add ( elements . Axis ( horizontal = True , points = 2 ) ) #NEWLINE# coordinate_system . add ( elements . Axis ( vertical = True , labels = 2 ) ) #NEWLINE# detached_axes_center = ( ( - 5 ) , 4 ) #NEWLINE# coordinate_system . add ( elements . Axis ( horizontal = True , points = 2 , labels = 2 , detached_center = detached_axes_center , color = ( 255 , 0 , 0 ) ) ) #NEWLINE# coordinate_system . add ( elements . Axis ( vertical = True , points = 2 , labels = 2 , detached_center = detached_axes_center , color = ( 0 , 0 , 255 ) ) ) #NEWLINE# detached_axes_center = ( 4 , ( - 5 ) ) #NEWLINE# coordinate_system . add ( elements . Axis ( horizontal = True , points = 2 , labels = 2 , detached_center = detached_axes_center , hide_negative = True ) ) #NEWLINE# coordinate_system . add ( elements . Axis ( vertical = True , points = 2 , labels = 2 , detached_center = detached_axes_center , hide_positive = True ) ) #NEWLINE# return ( coordinate_system . draw ( 300 , 200 ) , coordinate_system . draw ( 300 , 200 , antialiasing = True ) )