File: plot_fromdatafile.py

package info (click to toggle)
wxmplot 0.9.58-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,052 kB
  • sloc: python: 10,085; makefile: 88; sh: 2
file content (14 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python
from os import path
import numpy as np
import wxmplot.interactive as wi

fname = 'xafs.dat'
thisdir, _ = path.split(__file__)
dat = np.loadtxt(path.join(thisdir, fname))

x = dat[:, 0]
y = dat[:, 1]

wi.plot(x, y, xlabel='E (eV)', ylabel=r'$\mu(E)$',
        label='As K edge', title='Data from %s' % fname)