« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Legends
Legend Items in a Table
In[1]:=
X
primesgrid = Grid[Partition[ Table[If[PrimeQ[i], Style[i, Bold, 18, RGBColor[0.77, 0.42, 0.16]], Style[i, "Text" ]], {i, 1, 100}], 10], BaseStyle -> {FontFamily -> "Helvetica"}, Frame -> All, FrameStyle -> LightGray]
Emphasize the primes in a table of numbers and add a simple legend to the result.
Out[1]=
In[2]:=
X
legend = Column[{Style["primes", Bold, 18, RGBColor[0.77, 0.42, 0.16]], Style["composites", "Text"]}, BaseStyle -> {FontFamily -> "Helvetica"}]
Out[2]=
In[3]:=
X
Legended[primesgrid, legend]
Out[3]=