File: plotapp.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 (18 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from wxmplot import PlotApp
from numpy import arange, sin, cos, exp, pi

xx  = arange(0.0,12.0,0.1)
y1  = 1*sin(2*pi*xx/3.0)
y2  = 4*cos(2*pi*(xx-1)/5.0)/(6+xx)
y3  = -pi + 2*(xx/10. + exp(-(xx-3)/5.0))

p = PlotApp()
p.plot(xx, y1, color='blue',  style='dashed',
       title='Example PlotApp',  label='a',
       ylabel=r'$k^2\chi(k) $',
       xlabel=r'$  k \ (\AA^{-1}) $' )

p.oplot(xx, y2,  marker='+', linewidth=0, label =r'$ x_1 $')
p.oplot(xx, y3,  style='solid',          label ='x_2')
p.write_message('Try Help->Quick Reference')
p.run()