Thanks for you comments. I apologize for not posing the right answer here. For my case, there is nothing wrong with MATLAB. Actually I used scatter3. Here is what I did: scatter3(x,y,z,5,v,'s','filled'); we need to specify the size of the marker, in the above case, the size of marker is 5; if we don't designate a fixed size marker then the value v become the size of marker, which will severely slow down the progress. The argument v here is used to indicate the color of the marker.
Hopefully, this would help.