pointsPlot(dead link!)

I have thousands of points above needed to be plotted, these points have same format {x,y,z,value},the first time I tried making the graph as a group of thousands of discrete points,and use color index to distinguish differences among values by borrowing someone else code in the Forum.

x1Tmp = pointsPlot;
datat = Table[x1Tmp[[i, 4]], {i, 1, Length[x1Tmp]}];
min = Min[datat];
max = Max[datat];
Print["min = ", min]
Print["max = ", max]

valrange = {min, max};
x1Tmp[[All, 4]] = Rescale[x1Tmp[[All, 4]], valrange];
colfunc[x_, cf_] := ColorData[cf][1 - x[[4]]];

S0 = Graphics3D[{PointSize[0.01], 
   Point[#[[1 ;; 3]], VertexColors -> colfunc[#, "Rainbow"]] & /@ 

The top view of the group of these points is shown on the bottom.My question is that is it possible to fit these discrete points as a smooth surface making the feature stand out? discrete points

  • $\begingroup$ the values can be neglected first, just consider the shape, is there a good way to do this fit? $\endgroup$ – 吴剑涛 Jul 9 '17 at 15:22
  • $\begingroup$ btw the points are periodic, so is it supposed to fit the points in one periodic cycle? $\endgroup$ – 吴剑涛 Jul 9 '17 at 15:42
  • $\begingroup$ Perhaps look at the last example in the help page for ListInterpolation $\endgroup$ – Bill Jul 9 '17 at 17:07
  • 1
    $\begingroup$ Your data link is pretty scary. Lot of software that might get downloaded if one presses the wrong link not to mention all of the dating sites. Might you put your data in a less treacherous place? $\endgroup$ – JimB Jul 9 '17 at 17:21
  • $\begingroup$ @JimBaldwin,Yeah plz be care and choose "download this file", or just recommend me a safe place? Thx $\endgroup$ – 吴剑涛 Jul 9 '17 at 18:33

Contriving random data in the same format as yours with

pointsPlot = 
  With[{n = 500}, 
      Join[#1, {#2}] &, 
      {RandomReal[{-1., 1.}, {n, 3}], RandomInteger[42, n]}]];

I can make the plot of the kind you specify with much simpler and more efficient code than yours.

Module[{xyz, vals, colors},
  xyz = pointsPlot[[All, ;; 3]];
  vals = pointsPlot[[All, 4]];
  colors = colfunc[1 - #, "Rainbow"] & /@ Rescale[vals, MinMax[vals]];
  Graphics3D[MapThread[{AbsolutePointSize[8], #1, Point[#2]} &, {colors, xyz}]]]


I suggest you use this code to ploy your points.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.