• R/O
  • SSH

Tags
Aucun tag

Frequently used words (click to add to your profile)

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

File Info

Révision 9d6384ea1dbdf3e64e600034d201e05815efc804
Taille 690 octets
l'heure 2008-11-14 21:50:42
Auteur iselllo
Message de Log

I can now represent spheres having a diameter different from 1.

Content

#! /usr/bin/env python


import numpy as np
from enthought.mayavi import mlab

# x = np.arange(10)
# y = np.ones_like(x)
# z = np.ones_like(x)

x, y, z = np.loadtxt('cluster_50.dat').T
# s = x

s=np.loadtxt("neighbor_list.dat")

s_sorted=np.sort(s)

grid_col=len(np.unique1d(s_sorted))


mlab.clf()
pts = mlab.points3d(x, y, z, s, colormap='jet', scale_mode="none", scale_factor=1.06, resolution=20)
#mlab.axes(pts)
#mlab.colorbar(pts, title="Number of first neighbors")

cbar = mlab.colorbar(pts, title="Number of first neighbors")
cbar.number_of_labels = grid_col
cbar.maximum_number_of_colors = grid_col
cbar.label_format = '%.0f'



# We need to force a redraw.
mlab.draw()
mlab.show()