Skip to content
Snippets Groups Projects
Commit 8636bb34 authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Merge commit 'b5ec7b3c'

parents d194143c b5ec7b3c
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
# You may also find in interesting to change the volume.
import math
import pylab
import matplotlib.pyplot as plt
import numpy
import moose
import sys
......@@ -87,12 +87,14 @@ def makeModel():
moose.useClock( 4, '/model/compartment/##', 'process' )
moose.useClock( 8, '/model/graphs/#', 'process' )
def displayPlots():
print( 'Displaying plots' )
for x in moose.wildcardFind( '/model/graphs/conc#' ):
t = numpy.arange( 0, x.vector.size, 1 ) #sec
pylab.plot( t, x.vector, label=x.name )
pylab.legend()
pylab.show()
plt.plot( t, x.vector, label=x.name )
plt.legend()
plt.show()
def main():
solver = "gsl"
......@@ -132,8 +134,8 @@ def main():
# Iterate through all plots, dump their contents to data.plot.
displayPlots()
raw_input( 'Press any key to quit' )
quit()
# Run the 'main' if this script is executed standalone.
if __name__ == '__main__':
......
......@@ -8,5 +8,4 @@ rdes.buildModel()
moose.reinit()
moose.start( 0.3 )
rdes.display()
rdes.display()
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment