• 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évision377e0adeefed11610507cdea5ff059613e561f50 (tree)
l'heure2012-06-17 03:41:25
Auteurlorenzo
Commiterlorenzo

Message de Log

Modifications in the script to keep up with changes in mayavi2 mlab's syntax.

Change Summary

Modification

diff -r 7da4e5e47985 -r 377e0adeefed Python-codes/mayavi_colorbar.py
--- a/Python-codes/mayavi_colorbar.py Sat Jun 16 18:36:16 2012 +0000
+++ b/Python-codes/mayavi_colorbar.py Sat Jun 16 18:41:25 2012 +0000
@@ -1,16 +1,17 @@
11 #! /usr/bin/env python
22 import numpy as np
3-from enthought.mayavi import mlab
3+from mayavi import mlab
44
55 x, y, z = 10*np.random.random((3, 100))
66 s = np.random.random_integers(10 ,size=(100, ))
77 mlab.clf()
88 pts = mlab.points3d(x, y, z, s, colormap='jet', scale_mode='none',
99 resolution=20)
10-cbar = mlab.colorbar(pts, title="Number of first neighbors")
11-cbar.number_of_labels = 10
12-cbar.maximum_number_of_colors = 10
13-cbar.label_format = '%.0f'
10+cbar = mlab.colorbar(pts, title="Number of first neighbors", \
11+ nb_labels=10, nb_colors=10, label_fmt='%.0f')
12+# cbar.number_of_labels = 10
13+# cbar.maximum_number_of_colors = 10
14+# cbar.label_format = '%.0f'
1415
1516 # We need to force a redraw.
1617 mlab.draw()