@@ -86,47 +86,47 @@ def plot(dat_list,yerr_list=None, xerr_list=None, name_list=None,filename='plot.
8686 if (yerr_list is None and xerr_list is None ):
8787 if name_list is not None :
8888 if marker is None :
89- plt .plot (dat [0 ], dat [1 ],label = name_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
89+ plt .plot (dat [0 ], dat [1 ],label = name_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
9090 else :
91- plt .plot (dat [0 ], dat [1 ],label = name_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
91+ plt .plot (dat [0 ], dat [1 ],label = name_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
9292 else :
9393 if marker is None :
94- plt .plot (dat [0 ], dat [1 ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
94+ plt .plot (dat [0 ], dat [1 ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
9595 else :
96- plt .plot (dat [0 ], dat [1 ], marker = marker , linestyle = ls , color = _colors . next ())
96+ plt .plot (dat [0 ], dat [1 ], marker = marker , linestyle = ls , color = next (_colors ))
9797 elif (yerr_list is not None ) and (xerr_list is None ):
9898 if name_list is not None :
9999 if marker is None :
100- plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], label = name_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
100+ plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], label = name_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
101101 else :
102- plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
102+ plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
103103 else :
104104 if marker is None :
105- plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
105+ plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
106106 else :
107- plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
107+ plt .errorbar (dat [0 ], dat [1 ], yerr = yerr_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
108108 elif (yerr_list is None ) and (xerr_list is not None ):
109109 if name_list is not None :
110110 if marker is None :
111- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], label = name_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
111+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], label = name_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
112112 else :
113- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
113+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
114114 else :
115115 if marker is None :
116- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
116+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
117117 else :
118- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
118+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
119119 else :
120120 if name_list is not None :
121121 if marker is None :
122- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], label = name_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
122+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], label = name_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
123123 else :
124- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
124+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ],label = name_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
125125 else :
126126 if marker is None :
127- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], linestyle = ls , marker = _marker . next (), color = _colors . next ())
127+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], linestyle = ls , marker = next (_marker ), color = next (_colors ))
128128 else :
129- plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], marker = marker , linestyle = ls , color = _colors . next ())
129+ plt .errorbar (dat [0 ], dat [1 ], xerr = xerr_list [i ], yerr = yerr_list [i ], marker = marker , linestyle = ls , color = next (_colors ))
130130 i += 1
131131 if xticks is not None :
132132 plt .xticks (xticks )
@@ -430,7 +430,7 @@ def plot_step_vectors(vectors_resnames, filename='step_vectors.pdf',save=True,
430430 color_dict = {}
431431 color_names = {'POPC' :'green' , 'DOPE' :'blue' , 'TLCL2' :'gold' }
432432 for res in resnames :
433- color_dict [res ] = _colors . next ()
433+ color_dict [res ] = next (_colors )
434434 #color_dict['POPC'] = '#1e8449'
435435 colors = []
436436 for residue in vectors_resnames [1 ]:
@@ -1403,12 +1403,12 @@ def plot_ebar_hists(center_count_err, name_list=None, filename='ebar_hist.eps',
14031403 i = 0
14041404 for cce in center_count_err :
14051405 if name_list is not None :
1406- plt .errorbar (cce [0 ], cce [1 ], yerr = cce [2 ], marker = _marker . next (),
1407- drawstyle = 'steps-mid' , color = _colors . next (),
1406+ plt .errorbar (cce [0 ], cce [1 ], yerr = cce [2 ], marker = next (_marker ),
1407+ drawstyle = 'steps-mid' , color = next (_colors ),
14081408 label = name_list [i ])
14091409 else :
1410- plt .errorbar (cce [0 ], cce [1 ], yerr = cce [2 ], marker = _marker . next (),
1411- drawstyle = 'steps-mid' , color = _colors . next ())
1410+ plt .errorbar (cce [0 ], cce [1 ], yerr = cce [2 ], marker = next (_marker ),
1411+ drawstyle = 'steps-mid' , color = next (_colors ))
14121412 i += 1
14131413 if xlabel is not None :
14141414 plt .xlabel (xlabel )
@@ -1499,8 +1499,8 @@ def plot_spark_multi(xdats,ydats,filename='plot.eps', save=True, show=False, col
14991499 try :
15001500 color = colors [i ]
15011501 except :
1502- color = _colors . next ()
1503- ax .plot (xdat , ydat , color = color , marker = _marker . next (), linestyle = '-' )
1502+ color = next (_colors )
1503+ ax .plot (xdat , ydat , color = color , marker = next (_marker ), linestyle = '-' )
15041504 ax .fill_between (xdat , ydat , min (ydats [2 ]), alpha = 0.2 , color = color )
15051505 for k ,v in ax .spines .items ():
15061506 v .set_visible (False )
0 commit comments