@@ -584,7 +584,7 @@ def plot_channel(channel, a, results, iv_data=None, grid=True):
584584
585585
586586def  plot_kinetics (channel , a , results , grid = True ):
587-     fig   =   plt .figure ()
587+     plt .figure ()
588588    plt .get_current_fig_manager ().set_window_title (
589589        ("Time course(s) of activation variables of "  "%s from %s at %s degC" )
590590        %  (channel .id , channel .file , a .temperature )
@@ -627,7 +627,7 @@ def plot_kinetics(channel, a, results, grid=True):
627627
628628
629629def  plot_steady_state (channel , a , results , grid = True ):
630-     fig   =   plt .figure ()
630+     plt .figure ()
631631    plt .get_current_fig_manager ().set_window_title (
632632        ("Steady state(s) of activation variables of "  "%s from %s at %s degC" )
633633        %  (channel .id , channel .file , a .temperature )
@@ -748,7 +748,7 @@ def plot_iv_curves(channel, a, iv_data, grid=True):
748748
749749def  plot_iv_curve_vm (channel , a , hold_v , times , currents , grid = True ):
750750    # Holding potentials 
751-     fig   =   plt .figure ()
751+     plt .figure ()
752752    ax  =  plt .subplot (111 )
753753    plt .get_current_fig_manager ().set_window_title (
754754        ("Currents through voltage clamp for %s "  "from %s at %s degC, erev: %s V" )
@@ -775,7 +775,7 @@ def plot_iv_curve_vm(channel, a, hold_v, times, currents, grid=True):
775775
776776
777777def  make_iv_curve_fig (a , grid = True ):
778-     fig   =   plt .figure ()
778+     plt .figure ()
779779    plt .get_current_fig_manager ().set_window_title (
780780        "Currents vs. holding potentials at erev = %s V"  %  a .erev 
781781    )
@@ -794,7 +794,7 @@ def plot_iv_curve(a, hold_v, i, *plt_args, **plt_kwargs):
794794        plt_kwargs ["label" ] =  "Current" 
795795    if  not  same_fig :
796796        make_iv_curve_fig (a , grid = grid )
797-     if  type ( i )  is   dict :
797+     if  isinstance ( i ,  dict ) :
798798        i  =  [i [v ] for  v  in  hold_v ]
799799    plt .plot (
800800        [v  *  1e3  for  v  in  hold_v ], [ii  *  1e12  for  ii  in  i ], * plt_args , ** plt_kwargs 
0 commit comments