Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unprotect[ColorData];
- ColorData["myRainbow"] =
- Function[x, Blend[{Black, Purple, Blue, Cyan, Green, Yellow, Orange, Red}, x]];
- Protect[ColorData]
- Unprotect[ColorFunction];
- ColorFunction["myCF"] = Function[{y}, ColorData["myRainbow"][y]];
- Protect[ColorFunction];
- nd[y_, a_, b_, n_] := (Binomial[b - a + 1, y]*Sum[((-1)^i)*Binomial[y, i]*((y - i)/(b - a + 1))^n, {i, 0, y}]);
- myplot[y_] :=
- ArrayPlot[Table[nd[y, 1, K, n], {K, 1, 50}, {n, 1, 50}],
- ColorFunction -> "myCF", ColorFunctionScaling -> False,
- DataReversed -> True, Frame -> True, FrameTicks -> Automatic,
- FrameLabel -> {Rotate["K", -90 Degree], "N"}]
- myplot[5]
Add Comment
Please, Sign In to add comment