This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
plotting [2014/05/28 14:56] schatz created |
plotting [2014/05/28 14:58] schatz |
||
---|---|---|---|
Line 1: | Line 1: | ||
One good option for plotting is to use PYTHON's matplotlib. Below a sample script you can modify. This one graphs contents of a file called liquid.dat | One good option for plotting is to use PYTHON's matplotlib. Below a sample script you can modify. This one graphs contents of a file called liquid.dat | ||
- | <nowiki> | + | <code> |
from numpy import * | from numpy import * | ||
from pylab import * | from pylab import * | ||
Line 26: | Line 26: | ||
# Draw the plot to screen | # Draw the plot to screen | ||
show() | show() | ||
- | </nowiki> | + | </code> |
The data file for this example looks like this: | The data file for this example looks like this: | ||
- | <nowiki> | + | <code> |
1 1 2 1.112300 0.991998 0.120302 | 1 1 2 1.112300 0.991998 0.120302 | ||
1 2 3 2.827267 0.368785 2.458482 | 1 2 3 2.827267 0.368785 2.458482 | ||
Line 55: | Line 55: | ||
3 10 13 3.403000 1.080470 2.322530 | 3 10 13 3.403000 1.080470 2.322530 | ||
4 2 6 4.487250 2.103653 2.383597 | 4 2 6 4.487250 2.103653 2.383597 | ||
- | </nowiki> | + | </code> |