summaryrefslogtreecommitdiff
path: root/examples/plot.py
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2016-03-09 12:30:35 +0100
committerMario Mulansky <mario.mulansky@gmx.net>2016-03-09 12:30:35 +0100
commitee0e980b72c299eed12b7a3afc542fc470dd6d98 (patch)
tree6d63e2fe7bf9805ab6358e31bd0a641d58e40c87 /examples/plot.py
parent9f00431282ef2aae4b98a7a05fe5aa83b0e59673 (diff)
updated examples to use new unified interface
removed all occasions of *multi functions from examples as they are considered deprecated now. Uses unified interface everywhere.
Diffstat (limited to 'examples/plot.py')
-rw-r--r--examples/plot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/plot.py b/examples/plot.py
index 1922939..a0e04da 100644
--- a/examples/plot.py
+++ b/examples/plot.py
@@ -24,7 +24,8 @@ spike_trains = spk.load_spike_trains_from_txt("PySpike_testdata.txt",
for (i, spike_train) in enumerate(spike_trains):
plt.scatter(spike_train, i*np.ones_like(spike_train), marker='|')
-f = spk.isi_profile(spike_trains[0], spike_trains[1])
+# profile of the first two spike trains
+f = spk.isi_profile(spike_trains, indices=[0, 1])
x, y = f.get_plottable_data()
plt.figure()
@@ -32,7 +33,7 @@ plt.plot(x, np.abs(y), '--k', label="ISI-profile")
print("ISI-distance: %.8f" % f.avrg())
-f = spk.spike_profile(spike_trains[0], spike_trains[1])
+f = spk.spike_profile(spike_trains, indices=[0, 1])
x, y = f.get_plottable_data()
plt.plot(x, y, '-b', label="SPIKE-profile")