- Timestamp:
- Nov 26, 2012, 8:57:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/visualiser/commandline_viewer.py
r7276 r8649 39 39 # the stage height: 40 40 # 0 and 10 are the minimum and maximum values of the stage. 41 o.colour_height_quantity('stage', (lambda q: q['stage'], 0, 10))41 o.colour_height_quantity('stage', (lambda q: q['stage'], 1.0, 5.0)) 42 42 # Or with the magnitude of the momentum at that point: 43 43 # Needs the sqrt function from numeric. Again, 0 and 10 44 44 # define the colour range. 45 # o.colour_height_quantity('stage', 45 from numpy import sqrt 46 #o.colour_height_quantity('stage', 46 47 # (lambda q:sqrt((q['xmomentum'] ** 2) + 47 48 # (q['ymomentum'] ** 2)), 48 49 # 0, 10)) 50 o.colour_height_quantity('stage', 51 (lambda q: q['xmomentum']/ 52 (q['stage'] - q['elevation']), 53 0, 5)) 54 55 56 # Draw some axes on the visualiser so we can see how big the wave is 57 49 58 50 59 # Draw some axes on the visualiser so we can see how big the wave is
Note: See TracChangeset
for help on using the changeset viewer.