• R/O
  • SSH

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

修訂. 0ad420e2d7a8d7854c7ce0752ff55a7a2d260bb8
大小 614 bytes
時間 2008-03-17 00:45:21
作者 iselllo
Log Message

I added test_pylab_multiple_linestyles.py: it shows how to create a
figure with multiple INDEPENDENT line styles. It first creates a figure
object and then it draws upon it.

Content

#! /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"