diff --git a/moose-examples/tutorials/ChemicalBistables/simpleBis.py b/moose-examples/tutorials/ChemicalBistables/simpleBis.py index 34e2510a463b894925ff8a0799b9c0d1814f7bc8..4c577f5541d5401596bf1d253169e11d2ac13abc 100644 --- a/moose-examples/tutorials/ChemicalBistables/simpleBis.py +++ b/moose-examples/tutorials/ChemicalBistables/simpleBis.py @@ -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__': diff --git a/moose-examples/tutorials/Rdesigneur/rdes_ex2.py b/moose-examples/tutorials/Rdesigneur/rdes_ex2.py index 76901ae9e037a6bfa419b352d690a6357937d99c..9f72fe87b4a434e2cbff7a245a1da145f4955b3b 100644 --- a/moose-examples/tutorials/Rdesigneur/rdes_ex2.py +++ b/moose-examples/tutorials/Rdesigneur/rdes_ex2.py @@ -8,5 +8,4 @@ rdes.buildModel() moose.reinit() moose.start( 0.3 ) -rdes.display() - +rdes.display() \ No newline at end of file