Skip to content

Commit

Permalink
Update tests for new plots
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed May 3, 2016
1 parent 4608438 commit e1f5c99
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions brian2tools/tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
'''
import matplotlib
matplotlib.use('Agg')

from brian2 import *
from brian2tools import *

Expand Down Expand Up @@ -50,12 +51,29 @@ def test_plot_synapses():
close()
plot_synapses(synapses.i, synapses.j)
close()
plot_synapses(synapses.i, synapses.j, plot_type='scatter')
close()
plot_synapses(synapses.i, synapses.j, plot_type='image')
close()
plot_synapses(synapses.i, synapses.j, plot_type='hexbin')
close()
plot_synapses(synapses.i, synapses.j, synapses.w)
close()
plot_synapses(synapses.i, synapses.j, synapses.w, plot_type='scatter')
close()
plot_synapses(synapses.i, synapses.j, synapses.w, plot_type='image')
close()
plot_synapses(synapses.i, synapses.j, synapses.w, plot_type='hexbin')
close()

synapses.connect('i > 5') # More than one synapse per connection
brian_plot(synapses)
close()
# It should be possible to plot synaptic variables for multiple connections
# with hexbin
plot_synapses(synapses.i, synapses.j, synapses.w, plot_type='hexbin')
close()


def test_plot_morphology():
# Only testing 2D plotting for now
Expand Down

0 comments on commit e1f5c99

Please sign in to comment.