From b522eb5a7090f699fe23602979906c535261c4b4 Mon Sep 17 00:00:00 2001 From: tillraab Date: Wed, 11 Sep 2019 11:29:24 +0200 Subject: [PATCH] bf --- electrode_check.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/electrode_check.py b/electrode_check.py index 145b546..19e342a 100644 --- a/electrode_check.py +++ b/electrode_check.py @@ -284,9 +284,14 @@ def main(): for y in range(n_rows): for x in range(n_cols): ax = plt.subplot(gs[y, x]) - axs.append(ax) - gs.update(left=0.05, bottom=0.05, top=1, right=1) + if not y == n_rows -1: + ax.tick_params(axis='x', which='both', bottom=False, top=False, labelbottom=False) + + if not x == 0: + ax.tick_params(axis='y', which='both', left=False, right=False, labelleft=False) + axs.append(ax) + gs.update(left=0.05, bottom=0.05, top=1, right=1, hspace=0, wspace=0) # ax = np.hstack(ax) channel_handle = [] @@ -331,16 +336,14 @@ def main(): channel_array = np.arange(channels) channel_data = list(map(lambda x : data[x::channels][:250], channel_array)) channel_std = list(map(lambda x : np.std(data[x::channels][:250]), channel_array)) - power_channel = np.argmax(channel_std) - - + power_channel = np.argmax(channel_std)[0] max = np.max(np.hstack(channel_data)) min = np.min(np.hstack(channel_data)) if init_fig == True: for ch in channel_array: h, = axs[ch].plot(np.arange(250)[:len(channel_data[ch])] / rate, channel_data[ch], color='k') - axs[ch].set_ylim(min, max) + axs[ch].set_ylim(min - channel_std[power_channel], max + channel_std[power_channel]) channel_handle.append(h) plt.show(block=False) init_fig = False