File: plottest.py

package info (click to toggle)
scitools 0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,252 kB
  • ctags: 2,871
  • sloc: python: 28,744; sh: 112; makefile: 15
file content (21 lines) | stat: -rwxr-xr-x 545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from scitools import *
from scitools.easyviz.gnuplot_ import *
from time import sleep
x = seq(0, 15, 0.2)
y = sin(x)*x
v = sin(x)*sqrt(x)
w = sin(x)*x**0.33333333

plot(x, y, 'r-', x, v, 'b-', x, w, 'g-',
     legend=('sin(x)*x', 'sin(x)*sqrt(x)', 'sin(x)*x**0.33333333'),
     title='An easyviz demo', xlabel='X', ylabel='Y')
"""
plot(x, y, 'r-')
hold('on')
#plot(x, v)
plot(x, v, 'b-o')
legend('sin(x)*x', 'sin(x)*sqrt(x)', 'sin(x)*x**0.33333333')
title('An easyviz demo')
xlabel('x coordinate'); ylabel('function value')
plot(x, w, 'g-')
"""