• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Révision0ad420e2d7a8d7854c7ce0752ff55a7a2d260bb8 (tree)
l'heure2008-03-17 00:45:21
Auteuriselllo
Commiteriselllo

Message de Log

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.

Change Summary

Modification

diff -r 60811c05c9e6 -r 0ad420e2d7a8 Python-codes/test_pylab_multiple_linestyles.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Python-codes/test_pylab_multiple_linestyles.py Sun Mar 16 15:45:21 2008 +0000
@@ -0,0 +1,33 @@
1+#! /usr/bin/env python
2+
3+
4+import pylab as p
5+import numpy as n
6+import scipy as s
7+
8+x = s.arange(0.0, 2, 0.1)
9+y1 = s.sin(s.pi*x)
10+y2 = s.cos(s.pi*x)
11+
12+### Plot it ###
13+
14+fig = p.figure()
15+axes = fig.gca()
16+
17+axes.plot(x, y1, '--b', label='LW=1', linewidth=1)
18+axes.plot(x, y1+0.5, '--r', label='LW=2', linewidth=2)
19+axes.plot(x, y1+1.0, '--k', label='LW=3', linewidth=3)
20+
21+axes.plot(x, y2, 'xr', label='MS=3', markersize=3)
22+axes.plot(x, y2+0.5, 'xk', label='MS=5', markersize=5)
23+axes.plot(x, y2+1.0, 'xb', label='MS=7', markersize=7)
24+
25+axes.legend()
26+
27+#app.MainLoop()
28+p.savefig("my_figure.pdf")
29+
30+print "So far so good"
31+
32+
33+