daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Dec 15th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ArrayPlot[Table[x*y, {x, 4}, {y, 20}], Mesh -> True, ImageSize -> 1 -> 25]
  2.    
  3. (ArrayPlot[{#}, Mesh -> True, ImageSize -> 1 -> 25]) & /@ Table[x*y, {x, 4}, {y, 20}] // TableForm
  4.    
  5. tab = Table[x*y, {x, 4}, {y, 20}];
  6. GraphicsGrid[Table[g = (Max[tab] - tab[[i, j]])/Max[tab];
  7.     Graphics[{RGBColor[g, g, g], EdgeForm[Directive[Black]], Rectangle[]}],
  8.         {i, 1, 4}, {j, 1, 20}], Spacings -> {20, 200}, ImageSize -> 600]
  9.    
  10. ArrayPlot[Table[x y, {x, 4}, {y, 20}],
  11.   Mesh -> True,
  12.   ImageSize -> 1 -> 25,
  13.   MeshStyle -> {{White, Thickness[0.02]}, {White, Thickness[0.02]}}]
  14.    
  15. Clear[spacedArray]
  16. spacedArray[data_?MatrixQ] := Block[
  17.   {values, rectangle, range},
  18.   {values, rectangle, range} = First@Cases[
  19.      ArrayPlot[data, Mesh -> True],
  20.      Raster[values_, rectangle_, range_] :> {values, rectangle, range},
  21.      Infinity
  22.    ];
  23.   rectangle[[2, 2]] = rectangle[[2, 2]]/First@Dimensions[values];
  24.   Column[
  25.    Graphics[Raster[{#}, rectangle, range], ImageSize -> 1 -> 25] & /@ values
  26.   ]
  27. ]
  28.    
  29. spacedArray[Table[x*y, {x, 4}, {y, 20}]]
  30.    
  31. spacedArray[Table[x*y, {x, 5}, {y, 10}]]
  32.    
  33. table = Table[x*y, {x, 4}, {y, 20}];
  34. data = (1 - table/Max[table]);
  35.  
  36. Column[ListDensityPlot[{#, #}, InterpolationOrder -> {0, 0},
  37.   ColorFunctionScaling -> False, ColorFunction -> GrayLevel,
  38.   AspectRatio -> 1/20, Mesh -> All,
  39.   MeshStyle -> Directive[Antialiasing -> False, GrayLevel[-1 + GoldenRatio]],
  40.   Frame -> False, ImageSize -> 1 -> 40] & /@ data, Spacings -> 1]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top