Rev. | 0ad420e2d7a8d7854c7ce0752ff55a7a2d260bb8 |
---|---|
Größe | 614 Bytes |
Zeit | 2008-03-17 00:45:21 |
Autor | iselllo |
Log Message | I added test_pylab_multiple_linestyles.py: it shows how to create a
|
#! /usr/bin/env python
import pylab as p
import numpy as n
import scipy as s
x = s.arange(0.0, 2, 0.1)
y1 = s.sin(s.pi*x)
y2 = s.cos(s.pi*x)
### Plot it ###
fig = p.figure()
axes = fig.gca()
axes.plot(x, y1, '--b', label='LW=1', linewidth=1)
axes.plot(x, y1+0.5, '--r', label='LW=2', linewidth=2)
axes.plot(x, y1+1.0, '--k', label='LW=3', linewidth=3)
axes.plot(x, y2, 'xr', label='MS=3', markersize=3)
axes.plot(x, y2+0.5, 'xk', label='MS=5', markersize=5)
axes.plot(x, y2+1.0, 'xb', label='MS=7', markersize=7)
axes.legend()
#app.MainLoop()
p.savefig("my_figure.pdf")
print "So far so good"