summaryrefslogtreecommitdiff
path: root/examples/plot.py
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2014-10-20 18:13:23 +0200
committerMario Mulansky <mario.mulansky@gmx.net>2014-10-20 18:13:23 +0200
commite85e6a72662d30b677dd4c9ded6d2b1520ba63ec (patch)
treec06e084ce0aa521c014d14ea9fb3d131d823e9fc /examples/plot.py
parent0b238639ed487f47c846905294060c8f679780da (diff)
+multivariate example, docs for spike profile
Diffstat (limited to 'examples/plot.py')
-rw-r--r--examples/plot.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/plot.py b/examples/plot.py
index 6da7f49..59334c9 100644
--- a/examples/plot.py
+++ b/examples/plot.py
@@ -26,15 +26,17 @@ f = spk.isi_profile(spike_trains[0], spike_trains[1])
x, y = f.get_plottable_data()
plt.figure()
-plt.plot(x, np.abs(y), '--k')
+plt.plot(x, np.abs(y), '--k', label="ISI-profile")
-print("Average: %.8f" % f.avrg())
+print("ISI-distance: %.8f" % f.avrg())
f = spk.spike_profile(spike_trains[0], spike_trains[1])
x, y = f.get_plottable_data()
-print(x)
-print(y)
-#plt.figure()
-plt.plot(x, y, '-b')
+
+plt.plot(x, y, '-b', label="SPIKE-profile")
+
+print("SPIKE-distance: %.8f" % f.avrg())
+
+plt.legend(loc="upper left")
plt.show()