Cross-checked and polished remainders of fig_invariance_thresh_lp_species.pdf.
Added misc_functions.py for anything not plot-related.
This commit is contained in:
@@ -202,8 +202,15 @@ def assign_colors(handles, types, colors):
|
||||
handle.set_color(colors[str(int(type_id))])
|
||||
return None
|
||||
|
||||
def reorder_traces(handles, signal, zlow=2, zhigh=2.5):
|
||||
inds = np.argsort(signal.std(axis=0))
|
||||
def reorder_by_sd(handles, data, zlow=2, zhigh=2.5):
|
||||
inds = np.argsort(data.std(axis=0))
|
||||
zorders = np.linspace(zlow, zhigh, len(inds))[::-1]
|
||||
for ind, z in zip(inds, zorders):
|
||||
handles[ind].set_zorder(z)
|
||||
return None
|
||||
|
||||
def reorder_by_norm(handles, data, zlow=2, zhigh=2.5):
|
||||
inds = np.argsort(np.linalg.norm(data, axis=1))
|
||||
zorders = np.linspace(zlow, zhigh, len(inds))[::-1]
|
||||
for ind, z in zip(inds, zorders):
|
||||
handles[ind].set_zorder(z)
|
||||
|
||||
Reference in New Issue
Block a user