plotting works
This commit is contained in:
parent
96dede4e4d
commit
054405b574
@ -11,6 +11,7 @@ sampling_rate = 40 #kHz
|
||||
cut_window = 100
|
||||
cut_range = np.arange(-cut_window * sampling_rate, 0, 1)
|
||||
window = 1
|
||||
inch_factor = 2.54
|
||||
#dataset = "2018-11-13-ad-invivo-1"
|
||||
#dataset = "2018-11-13-aj-invivo-1"
|
||||
#dataset = "2018-11-13-ak-invivo-1" #al
|
||||
@ -48,15 +49,30 @@ for deltaf in df_map.keys():
|
||||
rates[deltaf][x] = modulation
|
||||
break
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
plt.close()
|
||||
fig = plt.figure()
|
||||
#figsize=(5 / inch_factor, 2.5 / inch_factor))
|
||||
fig.set_size_inches((5, 2.5))
|
||||
ax = fig.add_subplot(111)
|
||||
for i, df in enumerate(sorted(rates.keys())):
|
||||
max_rep = len(sorted(rates[df].keys()))-1
|
||||
for j, rep in enumerate(rates[df].keys()):
|
||||
if j == 15:
|
||||
if j == max_rep:
|
||||
farbe = 'royalblue'
|
||||
gro = 18
|
||||
gro = 8
|
||||
else:
|
||||
farbe = 'k'
|
||||
gro = 12
|
||||
gro = 6
|
||||
ax.plot(df, rates[df][rep], marker='o', color=farbe, ms=gro)
|
||||
|
||||
#ax.set_xlabel('difference frequency [Hz]', fontsize=20)
|
||||
ax.set_ylabel('firing modulation', fontsize=16)
|
||||
ax.set_xlabel('$\Delta$f [Hz]', fontsize=16)
|
||||
|
||||
ax.yaxis.set_tick_params(labelsize=14)
|
||||
ax.xaxis.set_tick_params(labelsize=14)
|
||||
|
||||
ax.spines["top"].set_visible(False)
|
||||
ax.spines["right"].set_visible(False)
|
||||
fig.tight_layout()
|
||||
plt.show()
|
||||
fig.savefig('spikes_beat_20af.png')
|
||||
|
Loading…
Reference in New Issue
Block a user