mirror of
https://github.com/ParticulateFlow/LPP.git
synced 2025-12-08 06:37:46 +00:00
Committer: ckloss <ckloss@fluid38.(none)>
On branch master Initial commit for lpp, version 2011-10-11
This commit is contained in:
30
scripts/plot.py
Normal file
30
scripts/plot.py
Normal file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Script: plot.py
|
||||
# Purpose: plots of a file of vectors
|
||||
# Syntax: plot.py gnu/matlab file
|
||||
# gnu/matlab = style of plots to create
|
||||
# file = a file with columns of data
|
||||
# Example: plot.py gnu file.dat
|
||||
# Author: Steve Plimpton (Sandia)
|
||||
|
||||
# enable script to run from Python directly w/out Pizza.py
|
||||
|
||||
import sys
|
||||
from plotview import plotview
|
||||
from gnu import gnu
|
||||
from matlab import matlab
|
||||
if not globals().has_key("argv"): argv = sys.argv
|
||||
|
||||
# main script
|
||||
|
||||
if len(argv) != 3:
|
||||
raise StandardError, "Syntax: plot.py gnu/matlab file"
|
||||
|
||||
style = argv[1]
|
||||
file = argv[2]
|
||||
|
||||
v = vec(file)
|
||||
exec "plot = %s()" % style
|
||||
p = plotview(v,plot)
|
||||
|
||||
Reference in New Issue
Block a user