<s> """<STR_LIT>""" <EOL> from __future__ import division , print_function <EOL> import numpy as np <EOL> import weakref <EOL> from . affines import voxel_sizes <EOL> from . optpkg import optional_package <EOL> from . orientations import aff2axcodes , axcodes2ornt <EOL> class OrthoSlicer3D ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , data , affine = None , axes = None , title = None ) : <EOL> """<STR_LIT>""" <EOL> self . _plt = plt = optional_package ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> mpl_patch = optional_package ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> self . _title = title <EOL> self . _closed = False <EOL> data = np . asanyarray ( data ) <EOL> if data . ndim < <NUM_LIT:3> : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> if np . iscomplexobj ( data ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> affine = np . array ( affine , float ) if affine is not None else np . eye ( <NUM_LIT:4> ) <EOL> if affine . shape != ( <NUM_LIT:4> , <NUM_LIT:4> ) : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> self . _affine = affine <EOL> codes = axcodes2ornt ( aff2axcodes ( self . _affine ) ) <EOL> self . _order = np . argsort ( [ c [ <NUM_LIT:0> ] for c in codes ] ) <EOL> self . _flips = np . array ( [ c [ <NUM_LIT:1> ] < <NUM_LIT:0> for c in codes ] ) [ self . _order ] <EOL> self . _flips = list ( self . _flips ) + [ False ] <EOL> self . _scalers = voxel_sizes ( self . _affine ) <EOL> self . _inv_affine = np . linalg . inv ( affine ) <EOL> self . _volume_dims = data . shape [ <NUM_LIT:3> : ] <EOL> self . _current_vol_data = data [ : , : , : , <NUM_LIT:0> ] if data . ndim > <NUM_LIT:3> else data <EOL> self . _data = data <EOL> self . _clim = np . percentile ( data , ( <NUM_LIT:1.> , <NUM_LIT> ) ) <EOL> del data <EOL> if axes is None : <EOL> fig , axes = plt . subplots ( <NUM_LIT:2> , <NUM_LIT:2> ) <EOL> fig . set_size_inches ( ( <NUM_LIT:8> , <NUM_LIT:8> ) , forward = True ) <EOL> self . _axes = [ axes [ <NUM_LIT:0> , <NUM_LIT:0> ] , axes [ <NUM_LIT:0> , <NUM_LIT:1> ] , axes [ <NUM_LIT:1> , <NUM_LIT:0> ] , axes [ <NUM_LIT:1> , <NUM_LIT:1> ] ] <EOL> plt . tight_layout ( pad = <NUM_LIT:0.1> ) <EOL> if self . n_volumes <= <NUM_LIT:1> : <EOL> fig . delaxes ( self . _axes [ <NUM_LIT:3> ] ) <EOL> self . _axes . pop ( - <NUM_LIT:1> ) <EOL> if self . _title is not None : <EOL> fig . canvas . set_window_title ( str ( title ) ) <EOL> else : <EOL> self . _axes = [ axes [ <NUM_LIT:0> ] , axes [ <NUM_LIT:1> ] , axes [ <NUM_LIT:2> ] ] <EOL> if len ( axes ) > <NUM_LIT:3> : <EOL> self . _axes . append ( axes [ <NUM_LIT:3> ] ) <EOL> self . _ims , self . _data_idx = list ( ) , list ( ) <EOL> self . _crosshairs = [ None ] * <NUM_LIT:3> <EOL> r = [ self . _scalers [ self . _order [ <NUM_LIT:2> ] ] / self . _scalers [ self . _order [ <NUM_LIT:1> ] ] , <EOL> self . _scalers [ self . _order [ <NUM_LIT:2> ] ] / self . _scalers [ self . _order [ <NUM_LIT:0> ] ] , <EOL> self . _scalers [ self . _order [ <NUM_LIT:1> ] ] / self . _scalers [ self . _order [ <NUM_LIT:0> ] ] ] <EOL> self . _sizes = [ self . _data . shape [ order ] for order in self . _order ] <EOL> for ii , xax , yax , ratio , label in zip ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> ] , [ <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ] , [ <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:1> ] , <EOL> r , ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) : <EOL> ax = self . _axes [ ii ] <EOL> d = np . zeros ( ( self . _sizes [ yax ] , self . _sizes [ xax ] ) ) <EOL> im = self . _axes [ ii ] . imshow ( <EOL> d , vmin = self . _clim [ <NUM_LIT:0> ] , vmax = self . _clim [ <NUM_LIT:1> ] , aspect = <NUM_LIT:1> , <EOL> cmap = '<STR_LIT>' , interpolation = '<STR_LIT>' , origin = '<STR_LIT>' ) <EOL> self . _ims . append ( im ) <EOL> vert = ax . plot ( [ <NUM_LIT:0> ] * <NUM_LIT:2> , [ - <NUM_LIT:0.5> , self . _sizes [ yax ] - <NUM_LIT:0.5> ] , <EOL> color = ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , linestyle = '<STR_LIT:->' ) [ <NUM_LIT:0> ] <EOL> horiz = ax . plot ( [ - <NUM_LIT:0.5> , self . _sizes [ xax ] - <NUM_LIT:0.5> ] , [ <NUM_LIT:0> ] * <NUM_LIT:2> , <EOL> color = ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , linestyle = '<STR_LIT:->' ) [ <NUM_LIT:0> ] <EOL> self . _crosshairs [ ii ] = dict ( vert = vert , horiz = horiz ) <EOL> lims = [ <NUM_LIT:0> , self . _sizes [ xax ] , <NUM_LIT:0> , self . _sizes [ yax ] ] <EOL> bump = <NUM_LIT> <EOL> poss = [ [ lims [ <NUM_LIT:1> ] / <NUM_LIT> , lims [ <NUM_LIT:3> ] ] , <EOL> [ ( <NUM_LIT:1> + bump ) * lims [ <NUM_LIT:1> ] , lims [ <NUM_LIT:3> ] / <NUM_LIT> ] , <EOL> [ lims [ <NUM_LIT:1> ] / <NUM_LIT> , <NUM_LIT:0> ] , <EOL> [ lims [ <NUM_LIT:0> ] - bump * lims [ <NUM_LIT:1> ] , lims [ <NUM_LIT:3> ] / <NUM_LIT> ] ] <EOL> anchors = [ [ '<STR_LIT>' , '<STR_LIT>' ] , [ '<STR_LIT:left>' , '<STR_LIT>' ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] , [ '<STR_LIT:right>' , '<STR_LIT>' ] ] <EOL> for pos , anchor , lab in zip ( poss , anchors , label ) : <EOL> ax . text ( pos [ <NUM_LIT:0> ] , pos [ <NUM_LIT:1> ] , lab , <EOL> horizontalalignment = anchor [ <NUM_LIT:0> ] , <EOL> verticalalignment = anchor [ <NUM_LIT:1> ] ) <EOL> ax . axis ( lims ) <EOL> ax . set_aspect ( ratio ) <EOL> ax . patch . set_visible ( False ) <EOL> ax . set_frame_on ( False ) <EOL> ax . axes . get_yaxis ( ) . set_visible ( False ) <EOL> ax . axes . get_xaxis ( ) . set_visible ( False ) <EOL> self . _data_idx . append ( <NUM_LIT:0> ) <EOL> self . _data_idx . append ( - <NUM_LIT:1> ) <EOL> if self . n_volumes > <NUM_LIT:1> and len ( self . _axes ) > <NUM_LIT:3> : <EOL> ax = self . _axes [ <NUM_LIT:3> ] <EOL> try : <EOL> ax . set_facecolor ( '<STR_LIT:k>' ) <EOL> except AttributeError : <EOL> ax . set_axis_bgcolor ( '<STR_LIT:k>' ) <EOL> ax . set_title ( '<STR_LIT>' ) <EOL> y = np . zeros ( self . n_volumes + <NUM_LIT:1> ) <EOL> x = np . arange ( self . n_volumes + <NUM_LIT:1> ) - <NUM_LIT:0.5> <EOL> step = ax . step ( x , y , where = '<STR_LIT>' , color = '<STR_LIT:y>' ) [ <NUM_LIT:0> ] <EOL> ax . set_xticks ( np . unique ( np . linspace ( <NUM_LIT:0> , self . n_volumes - <NUM_LIT:1> , <EOL> <NUM_LIT:5> ) . astype ( int ) ) ) <EOL> ax . set_xlim ( x [ <NUM_LIT:0> ] , x [ - <NUM_LIT:1> ] ) <EOL> yl = [ self . _data . min ( ) , self . _data . max ( ) ] <EOL> yl = [ l + s * np . diff ( lims ) [ <NUM_LIT:0> ] for l , s in zip ( yl , [ - <NUM_LIT> , <NUM_LIT> ] ) ] <EOL> patch = mpl_patch . Rectangle ( [ - <NUM_LIT:0.5> , yl [ <NUM_LIT:0> ] ] , <NUM_LIT:1.> , np . diff ( yl ) [ <NUM_LIT:0> ] , <EOL> fill = True , facecolor = ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , <EOL> edgecolor = ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , alpha = <NUM_LIT> ) <EOL> ax . add_patch ( patch ) <EOL> ax . set_ylim ( yl ) <EOL> self . _volume_ax_objs = dict ( step = step , patch = patch ) <EOL> self . _figs = set ( [ a . figure for a in self . _axes ] ) <EOL> for fig in self . _figs : <EOL> fig . canvas . mpl_connect ( '<STR_LIT>' , self . _on_scroll ) <EOL> fig . canvas . mpl_connect ( '<STR_LIT>' , self . _on_mouse ) <EOL> fig . canvas . mpl_connect ( '<STR_LIT>' , self . _on_mouse ) <EOL> fig . canvas . mpl_connect ( '<STR_LIT>' , self . _on_keypress ) <EOL> fig . canvas . mpl_connect ( '<STR_LIT>' , self . _cleanup ) <EOL> self . _position = np . zeros ( <NUM_LIT:4> ) <EOL> self . _position [ <NUM_LIT:3> ] = <NUM_LIT:1.> <EOL> self . _changing = False <EOL> self . _links = [ ] <EOL> self . _plt . draw ( ) <EOL> for fig in self . _figs : <EOL> fig . canvas . draw ( ) <EOL> self . _set_volume_index ( <NUM_LIT:0> , update_slices = False ) <EOL> self . _set_position ( <NUM_LIT:0.> , <NUM_LIT:0.> , <NUM_LIT:0.> ) <EOL> self . _draw ( ) <EOL> def __repr__ ( self ) : <EOL> title = '<STR_LIT>' if self . _title is None else ( '<STR_LIT>' % self . _title ) <EOL> vol = '<STR_LIT>' if self . n_volumes <= <NUM_LIT:1> else ( '<STR_LIT>' % self . n_volumes ) <EOL> r = ( '<STR_LIT>' <EOL> % ( self . __class__ . __name__ , title , self . _sizes [ <NUM_LIT:0> ] , self . _sizes [ <NUM_LIT:1> ] , <EOL> self . _sizes [ <NUM_LIT:2> ] , vol ) ) <EOL> return r <EOL> def show ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _plt . show ( ) <EOL> def close ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _cleanup ( ) <EOL> for f in self . _figs : <EOL> self . _plt . close ( f ) <EOL> def _cleanup ( self ) : <EOL> """<STR_LIT>""" <EOL> self . _closed = True <EOL> for link in list ( self . _links ) : <EOL> self . _unlink ( link ( ) ) <EOL> def draw ( self ) : <EOL> """<STR_LIT>""" <EOL> for fig in self . _figs : <EOL> fig . canvas . draw ( ) <EOL> @ property <EOL> def n_volumes ( self ) : <EOL> """<STR_LIT>""" <EOL> return int ( np . prod ( self . _volume_dims ) ) <EOL> @ property <EOL> def position ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _position [ : <NUM_LIT:3> ] . copy ( ) <EOL> @ property <EOL> def figs ( self ) : <EOL> """<STR_LIT>""" <EOL> return tuple ( self . _figs ) <EOL> @ property <EOL> def cmap ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _cmap <EOL> @ cmap . setter <EOL> def cmap ( self , cmap ) : <EOL> for im in self . _ims : <EOL> im . set_cmap ( cmap ) <EOL> self . _cmap = cmap <EOL> self . draw ( ) <EOL> @ property <EOL> def clim ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _clim <EOL> @ clim . setter <EOL> def clim ( self , clim ) : <EOL> clim = np . array ( clim , float ) <EOL> if clim . shape != ( <NUM_LIT:2> , ) : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> for im in self . _ims : <EOL> im . set_clim ( clim ) <EOL> self . _clim = tuple ( clim ) <EOL> self . draw ( ) <EOL> def link_to ( self , other ) : <EOL> """<STR_LIT>""" <EOL> if not isinstance ( other , self . __class__ ) : <EOL> raise TypeError ( '<STR_LIT>' <EOL> % ( self . __class__ . __name__ , type ( other ) ) ) <EOL> self . _link ( other , is_primary = True ) <EOL> def _link ( self , other , is_primary ) : <EOL> """<STR_LIT>""" <EOL> ref = weakref . ref ( other ) <EOL> if ref in self . _links : <EOL> return <EOL> self . _links . append ( ref ) <EOL> if is_primary : <EOL> other . _link ( self , is_primary = False ) <EOL> other . set_position ( * self . position ) <EOL> def _unlink ( self , other ) : <EOL> """<STR_LIT>""" <EOL> ref = weakref . ref ( other ) <EOL> if ref in self . _links : <EOL> self . _links . pop ( self . _links . index ( ref ) ) <EOL> ref ( ) . _unlink ( self ) <EOL> def _notify_links ( self ) : <EOL> """<STR_LIT>""" <EOL> for link in self . _links : <EOL> link ( ) . set_position ( * self . position [ : <NUM_LIT:3> ] ) <EOL> def set_position ( self , x = None , y = None , z = None ) : <EOL> """<STR_LIT>""" <EOL> self . _set_position ( x , y , z ) <EOL> self . _draw ( ) <EOL> def set_volume_idx ( self , v ) : <EOL> """<STR_LIT>""" <EOL> self . _set_volume_index ( v ) <EOL> self . _draw ( ) <EOL> def _set_volume_index ( self , v , update_slices = True ) : <EOL> """<STR_LIT>""" <EOL> v = self . _data_idx [ <NUM_LIT:3> ] if v is None else int ( round ( v ) ) <EOL> if v == self . _data_idx [ <NUM_LIT:3> ] : <EOL> return <EOL> max_ = np . prod ( self . _volume_dims ) <EOL> self . _data_idx [ <NUM_LIT:3> ] = max ( min ( int ( round ( v ) ) , max_ - <NUM_LIT:1> ) , <NUM_LIT:0> ) <EOL> idx = ( slice ( None ) , slice ( None ) , slice ( None ) ) <EOL> if self . _data . ndim > <NUM_LIT:3> : <EOL> idx = idx + tuple ( np . unravel_index ( self . _data_idx [ <NUM_LIT:3> ] , <EOL> self . _volume_dims ) ) <EOL> self . _current_vol_data = self . _data [ idx ] <EOL> if update_slices : <EOL> self . _set_position ( None , None , None , notify = False ) <EOL> def _set_position ( self , x , y , z , notify = True ) : <EOL> """<STR_LIT>""" <EOL> if self . _changing : <EOL> return <EOL> self . _changing = True <EOL> x = self . _position [ <NUM_LIT:0> ] if x is None else float ( x ) <EOL> y = self . _position [ <NUM_LIT:1> ] if y is None else float ( y ) <EOL> z = self . _position [ <NUM_LIT:2> ] if z is None else float ( z ) <EOL> self . _position [ : <NUM_LIT:3> ] = [ x , y , z ] <EOL> idxs = np . dot ( self . _inv_affine , self . _position ) [ : <NUM_LIT:3> ] <EOL> for ii , ( size , idx ) in enumerate ( zip ( self . _sizes , idxs ) ) : <EOL> self . _data_idx [ ii ] = max ( min ( int ( round ( idx ) ) , size - <NUM_LIT:1> ) , <NUM_LIT:0> ) <EOL> for ii in range ( <NUM_LIT:3> ) : <EOL> data = np . rollaxis ( self . _current_vol_data , <EOL> axis = self . _order [ ii ] ) [ self . _data_idx [ ii ] ] <EOL> xax = [ <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ] [ ii ] <EOL> yax = [ <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:1> ] [ ii ] <EOL> if self . _order [ xax ] < self . _order [ yax ] : <EOL> data = data . T <EOL> if self . _flips [ xax ] : <EOL> data = data [ : , : : - <NUM_LIT:1> ] <EOL> if self . _flips [ yax ] : <EOL> data = data [ : : - <NUM_LIT:1> ] <EOL> self . _ims [ ii ] . set_data ( data ) <EOL> loc = self . _data_idx [ ii ] <EOL> if self . _flips [ ii ] : <EOL> loc = self . _sizes [ ii ] - loc <EOL> loc = [ loc ] * <NUM_LIT:2> <EOL> if ii == <NUM_LIT:0> : <EOL> self . _crosshairs [ <NUM_LIT:2> ] [ '<STR_LIT>' ] . set_xdata ( loc ) <EOL> self . _crosshairs [ <NUM_LIT:1> ] [ '<STR_LIT>' ] . set_xdata ( loc ) <EOL> elif ii == <NUM_LIT:1> : <EOL> self . _crosshairs [ <NUM_LIT:2> ] [ '<STR_LIT>' ] . set_ydata ( loc ) <EOL> self . _crosshairs [ <NUM_LIT:0> ] [ '<STR_LIT>' ] . set_xdata ( loc ) <EOL> else : <EOL> self . _crosshairs [ <NUM_LIT:1> ] [ '<STR_LIT>' ] . set_ydata ( loc ) <EOL> self . _crosshairs [ <NUM_LIT:0> ] [ '<STR_LIT>' ] . set_ydata ( loc ) <EOL> if self . n_volumes > <NUM_LIT:1> and len ( self . _axes ) > <NUM_LIT:3> : <EOL> idx = [ slice ( None ) ] * len ( self . _axes ) <EOL> for ii in range ( <NUM_LIT:3> ) : <EOL> idx [ self . _order [ ii ] ] = self . _data_idx [ ii ] <EOL> vdata = self . _data [ idx ] . ravel ( ) <EOL> vdata = np . concatenate ( ( vdata , [ vdata [ - <NUM_LIT:1> ] ] ) ) <EOL> self . _volume_ax_objs [ '<STR_LIT>' ] . set_x ( self . _data_idx [ <NUM_LIT:3> ] - <NUM_LIT:0.5> ) <EOL> self . _volume_ax_objs [ '<STR_LIT>' ] . set_ydata ( vdata ) <EOL> if notify : <EOL> self . _notify_links ( ) <EOL> self . _changing = False <EOL> def _in_axis ( self , event ) : <EOL> """<STR_LIT>""" <EOL> if getattr ( event , '<STR_LIT>' ) is None : <EOL> return None <EOL> for ii , ax in enumerate ( self . _axes ) : <EOL> if event . inaxes is ax : <EOL> return ii <EOL> def _on_scroll ( self , event ) : <EOL> """<STR_LIT>""" <EOL> assert event . button in ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> ii = self . _in_axis ( event ) <EOL> if ii is None : <EOL> return <EOL> if event . key is not None and '<STR_LIT>' in event . key : <EOL> if self . n_volumes <= <NUM_LIT:1> : <EOL> return <EOL> ii = <NUM_LIT:3> <EOL> assert ii in range ( <NUM_LIT:4> ) <EOL> dv = <NUM_LIT> if event . key is not None and '<STR_LIT>' in event . key else <NUM_LIT:1.> <EOL> dv *= <NUM_LIT:1.> if event . button == '<STR_LIT>' else - <NUM_LIT:1.> <EOL> dv *= - <NUM_LIT:1> if self . _flips [ ii ] else <NUM_LIT:1> <EOL> val = self . _data_idx [ ii ] + dv <EOL> if ii == <NUM_LIT:3> : <EOL> self . _set_volume_index ( val ) <EOL> else : <EOL> coords = [ self . _data_idx [ k ] for k in range ( <NUM_LIT:3> ) ] + [ <NUM_LIT:1.> ] <EOL> coords [ ii ] = val <EOL> self . _set_position ( * np . dot ( self . _affine , coords ) [ : <NUM_LIT:3> ] ) <EOL> self . _draw ( ) <EOL> def _on_mouse ( self , event ) : <EOL> """<STR_LIT>""" <EOL> if event . button != <NUM_LIT:1> : <EOL> return <EOL> ii = self . _in_axis ( event ) <EOL> if ii is None : <EOL> return <EOL> if ii == <NUM_LIT:3> : <EOL> self . _set_volume_index ( event . xdata ) <EOL> else : <EOL> xax , yax = [ [ <NUM_LIT:1> , <NUM_LIT:2> ] , [ <NUM_LIT:0> , <NUM_LIT:2> ] , [ <NUM_LIT:0> , <NUM_LIT:1> ] ] [ ii ] <EOL> x , y = event . xdata , event . ydata <EOL> x = self . _sizes [ xax ] - x if self . _flips [ xax ] else x <EOL> y = self . _sizes [ yax ] - y if self . _flips [ yax ] else y <EOL> idxs = [ None , None , None , <NUM_LIT:1.> ] <EOL> idxs [ xax ] = x <EOL> idxs [ yax ] = y <EOL> idxs [ ii ] = self . _data_idx [ ii ] <EOL> self . _set_position ( * np . dot ( self . _affine , idxs ) [ : <NUM_LIT:3> ] ) <EOL> self . _draw ( ) <EOL> def _on_keypress ( self , event ) : <EOL> """<STR_LIT>""" <EOL> if event . key is not None and '<STR_LIT>' in event . key : <EOL> self . close ( ) <EOL> elif event . key in [ "<STR_LIT:=>" , '<STR_LIT:+>' ] : <EOL> new_idx = min ( self . _data_idx [ <NUM_LIT:3> ] + <NUM_LIT:1> , self . n_volumes ) <EOL> self . _set_volume_index ( new_idx , update_slices = True ) <EOL> self . _draw ( ) <EOL> elif event . key == '<STR_LIT:->' : <EOL> new_idx = max ( self . _data_idx [ <NUM_LIT:3> ] - <NUM_LIT:1> , <NUM_LIT:0> ) <EOL> self . _set_volume_index ( new_idx , update_slices = True ) <EOL> self . _draw ( ) <EOL> def _draw ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . _closed : <EOL> return <EOL> for ii in range ( <NUM_LIT:3> ) : <EOL> ax = self . _axes [ ii ] <EOL> ax . draw_artist ( self . _ims [ ii ] ) <EOL> for line in self . _crosshairs [ ii ] . values ( ) : <EOL> ax . draw_artist ( line ) <EOL> ax . figure . canvas . blit ( ax . bbox ) <EOL> if self . n_volumes > <NUM_LIT:1> and len ( self . _axes ) > <NUM_LIT:3> : <EOL> ax = self . _axes [ <NUM_LIT:3> ] <EOL> ax . draw_artist ( ax . patch ) <EOL> for key in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> ax . draw_artist ( self . _volume_ax_objs [ key ] ) <EOL> ax . figure . canvas . blit ( ax . bbox ) </s>
