Guest User

Untitled

a guest
Nov 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. myRainbow = Function[x, Blend[{Purple, Blue, Green, Yellow, Red}, x]];
  2.  
  3. nd[y_, a_, b_, n_] :=
  4. (Binomial[b - a + 1, y] *
  5. Sum[((-1)^i)*Binomial[y, i]*((y - i)/(b - a + 1))^n, {i, 0, y}]);
  6. ArrayPlot[Table[nd[3, 1, K, n], {K, 1, 15}, {n, 1, 15}],
  7. ColorFunction -> myRainbow, DataReversed -> True]
  8.  
  9. DiscretePlot3D[nd[3, 1, k, n], {n, 1, 15}, {k, 1, 15},
  10. PlotRange -> {0, 1}, ExtentSize -> Full, ColorFunction -> myRainbow]
  11.  
  12. rainbow[z_] := Blend[{Purple, Blue, Green, Yellow, Red}, z]
  13. rainbow[_, _, z_] := rainbow[z]
  14.  
  15. DiscretePlot3D[
  16. nd[3, 1, k, n], {n, 1, 15}, {k, 1, 15},
  17. PlotRange -> {0, 1},
  18. ExtentSize -> Full,
  19. ColorFunction -> rainbow
  20. ]
  21.  
  22. GeneralUtilities`PrintDefinitions[DiscretePlot3D]]
  23.  
  24. ColorData[cf, #3] &
  25.  
  26. cf
  27.  
  28. Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1}, ColorFunction -> "Rainbow"]
  29.  
  30. Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1},
  31. ColorFunction -> ColorData["Rainbow"]]
  32.  
  33. Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1},
  34. ColorFunction -> (ColorData["Rainbow"][#] &)]
  35.  
  36. # &[1, 2, 3]
  37. (* 1 *)
  38.  
  39. Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1},
  40. ColorFunction -> (ColorData["Rainbow"][#3] &)]
  41.  
  42. ColorFunction -> (myRainbow[#3]&)
Add Comment
Please, Sign In to add comment