~ubuntu-branches/ubuntu/maverick/dolfin/maverick

« back to all changes in this revision

Viewing changes to demo/ode/reaction/cpp/plot.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2009-10-12 14:13:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091012141318-hkbxl0sq555vqv7d
Tags: 0.9.4-1
* New upstream release. This version cleans up the design of the
  function class by adding a new abstraction for user-defined
  functions called Expression. A number of minor bugfixes and
  improvements have also been made.
* debian/watch: Update for new flat directory structure.
* Update debian/copyright.
* debian/rules: Use explicit paths to PETSc 3.0.0 and SLEPc 3.0.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Import solution
 
2
from solution import *
 
3
 
 
4
# Import matplotlib
 
5
from pylab import *
 
6
 
 
7
# Plot solution
 
8
figure(1)
 
9
plot(t, u)
 
10
grid(True)
 
11
xlabel('t')
 
12
ylabel('u(t)')
 
13
title('Solution')
 
14
 
 
15
# Plot solution
 
16
figure(2)
 
17
plot(t, k)
 
18
grid(True)
 
19
xlabel('t')
 
20
ylabel('k(t)')
 
21
title('Multi-adaptive time steps')
 
22
 
 
23
show()