diff --git a/src/pyNAVIS/plots.py b/src/pyNAVIS/plots.py index 929cb2d..c3a308a 100644 --- a/src/pyNAVIS/plots.py +++ b/src/pyNAVIS/plots.py @@ -82,6 +82,7 @@ def spikegram(spikes_file, settings, dot_size = 0.2, dot_freq = 1, graph_tile = if start_at_zero: plt.xlim([0, np.max(spikes_file.timestamps)]) + plt.tight_layout() spk_fig.show() @staticmethod @@ -223,6 +224,7 @@ def histogram(spikes_file, settings, bar_line = 1, graph_tile = 'Histogram', ver else: plt.plot(np.arange(settings.num_channels * (settings.on_off_both + 1) * (settings.mono_stereo + 1)), spikes_count) + plt.tight_layout() hst_fig.show() @staticmethod @@ -298,6 +300,8 @@ def average_activity(spikes_file, settings, graph_tile = 'Average activity', ver if(settings.mono_stereo == 1): plt.plot(np.arange(math.ceil(total_time/settings.bin_size)+1), average_activity_R, label='Right cochlea') plt.legend(loc='best', ncol=2, frameon=True) + + plt.tight_layout() avg_fig.show() @staticmethod