• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisão7da4e5e47985919085845188a56fd59da76d7135 (tree)
Hora2012-06-17 03:36:16
Autorlorenzo
Commiterlorenzo

Mensagem de Log

I slightly changed the syntax: I import mlab in a different way and I moved
the specifications about the colorbar inside the definition of the colorbar
itself (for some reason, they stopped working in the old way. Probably an
updated syntax of the software).

Mudança Sumário

Diff

diff -r b51a717be7ac -r 7da4e5e47985 Python-codes/read_and_plot_aggregates.py
--- a/Python-codes/read_and_plot_aggregates.py Sun May 06 12:22:46 2012 +0000
+++ b/Python-codes/read_and_plot_aggregates.py Sat Jun 16 18:36:16 2012 +0000
@@ -1,6 +1,8 @@
11 #! /usr/bin/env python
22
3-from enthought.mayavi import mlab
3+# from enthought.mayavi import mlab
4+
5+from mayavi import mlab
46
57 import scipy as s
68 import numpy as n
@@ -8,7 +10,7 @@
810 import sys
911
1012 kf=1.3
11-df= 2.1 # 1.8
13+df= 2.3 # 1.8
1214
1315 print sys.argv
1416
@@ -108,7 +110,7 @@
108110
109111
110112 dist_mat=euclidean_distances(final_cluster,final_cluster)
111-n.savetxt("distances.dat",n.ravel(dist_mat))
113+
112114
113115 print "s.shape(dist_mat) is, ", s.shape(dist_mat)
114116
@@ -139,10 +141,10 @@
139141 mlab.clf()
140142 pts = mlab.points3d(x, y, z, k, colormap='jet', scale_mode='none',\
141143 resolution=20, scale_factor=2)
142-cbar = mlab.colorbar(pts, title="Number of first neighbors")
143-cbar.number_of_labels = n_lab
144-cbar.maximum_number_of_colors =n_lab
145-cbar.label_format = '%.0f'
144+cbar = mlab.colorbar(pts, title="Number of first neighbors",nb_labels = n_lab, nb_colors=n_lab, label_fmt= '%.0f')
145+# cbar.number_of_labels = n_lab
146+# cbar.maximum_number_of_colors =n_lab
147+# cbar.label_format = '%.0f'
146148
147149 # We need to force a redraw.
148150 mlab.draw()