Tag Info

New answers tagged

4

There are no spacings outside so Spacings -> {0, 0} should work. [...]


1

When needing to style individual items in a Grid, one solution is to wrap them with Item. Grid[{{Item[1, Frame -> True], 2}, {3, Item[4, Frame -> True]}}] Item allows applying Grid-specific styling (i.e. things that don't make sense outside of grid and cannot be easily added with Style) for each grid item separately. Frames, e.g., can be added ...


2

n=5; p = Array[#1 + #2 &, {n, n}]; Grid[p, ItemStyle -> Join[{Automatic, Automatic}, {Flatten[Table[{i, j} -> {"Subsection", ColorData[3][i + j]}, {i, n}, {j, n}], 1]}]]


6

data = RandomInteger[10, {5, 10, 5}]; OpenerView Column[Map[OpenerView[{Grid[{Total@#}, Dividers -> All, ItemSize -> 3, Background -> Pink], Grid[#, Dividers -> All, ItemSize -> 3, Background -> LightBlue]}] &, data]] FlipView Column[Map[FlipView[{Grid[{Total@#}, Dividers -> All, ItemSize -> 3, Background -> ...


2

Well, what you want is not really a simple grid, because its irregular, but a combination of two grids: Grid[{{Grid[{{a, b, c}}]}, {Grid[{{d, e}}]}}] The other thing you can try is to construct it by rows and columns: Column[{Row[{a, b, c}, " "], Row[{d, e}, " "]}, Center] Here's nice overview of all this stuff: ...


3

Maybe Column[Row[#, Spacer[5]] & /@ {{a, b, c}, {d, e}}, Alignment -> Center] {a, b, c, d, e, f, g, h, i} = Table[With[{data = MapIndexed[Flatten[{##}] &, RandomReal[1, {100, 2}]], color = RandomChoice[ColorData["Gradients"]], intord = RandomInteger[{0, 4}]}, ListDensityPlot[data, InterpolationOrder -> intord, ...


3

With data being your input text: col = With[{l = Length[Last /@ data[[2 ;;]]]}, Table[Blend[{Red, Yellow, Green}, x],{x, 0, 1, 1/(l - 1)}]]; Grid[data, Frame -> All, Background -> {None, None, Join[{{{1, 1}, {1, 2}} -> LightGray}, Rule @@@ Thread@{{#, 2} & /@ Range[2, Length@data], col}]}, Alignment -> Left] Or with ...


7

Try this: Background -> {None, Prepend[Table[Hue[(k - 2)/35], {k, 15}], White]} Pedagogical word of caution: this might not be the best example to give to grade-school students, as the bottom entry has a decibel level of zero; this may naturally lead students to think that the minimum possible decibel level is zero, which is false. Including examples ...


1

mat = {{{1, 678}, {1, 678}, {1, 678}, {1, 678}}, {{2, 1888}, {2, 1888}, {2, 1888}, {2, 1888}}}; res = Rule @@@ Catenate @ mat // Merge[Identity] res[2]


5

u[[1, All, 2]] (* {678, 678, 678, 678, 678, 678, 678, 678, 678, 678} *) u[[2, All, 2]] (* {1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888} *)



Top 50 recent answers are included