~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/demo/ode/courtemanche/plot.py

  • Committer: Johannes Ring
  • Date: 2008-03-05 22:43:06 UTC
  • Revision ID: johannr@simula.no-20080305224306-2npsdyhfdpl2esji
The BIG commit!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Import matplotlib
2
 
from pylab import *
3
 
 
4
 
# Import solution
5
 
from solution import *
6
 
 
7
 
# Plot first component of solution
8
 
subplot(211)
9
 
plot(t, u[:,0])
10
 
grid(True)
11
 
xlabel('t')
12
 
ylabel('V(t)')
13
 
title('Courtemanche')
14
 
 
15
 
# Plot time steps
16
 
subplot(212)
17
 
semilogy(t, k[:,0])
18
 
grid(True)
19
 
xlabel('t')
20
 
ylabel('k(t)')
21
 
 
22
 
# Display value at end time
23
 
print "V(T) = " + str(u[len(u) - 1, 0])
24
 
 
25
 
show()