is a symbol that can appear at a particular position in a Grid or related construct to indicate that the corresponding position is occupied by a spanning element that appears above it.
SpanFromAbove
is a symbol that can appear at a particular position in a Grid or related construct to indicate that the corresponding position is occupied by a spanning element that appears above it.
Details
- If SpanFromAbove appears at the same position in several successive rows, it indicates spanning across all these rows.
Examples
open all close allBasic Examples (3)
Make the element 2 span the row below it:
Grid[{{1, 2, 3}, {4, SpanFromAbove, 6}, {7, 8, 9}}, Frame -> All]Grid[{{1, 2, 3}, {4, SpanFromAbove, 6}, {7, SpanFromAbove, 9}}, Frame -> All]Spanning in a GraphicsGrid:
GraphicsGrid[{{1, 2, 3}, {4, SpanFromAbove, 6}, {7, SpanFromAbove, 9}}, Frame -> All]Scope (2)
Spanned elements inherit their styles:
Grid[{{1, Item[2, Background -> Red], 3}, {4, SpanFromAbove, 6}, {7, SpanFromAbove, 9}}, Frame -> All]Grid[{{1, 2, 3}, {4, SpanFromAbove, 6}, {7, SpanFromAbove, 9}}, Frame -> All, Background -> {Automatic, Automatic, {1, 2} -> Red}]Graphics will default to filling the available space:
GraphicsGrid[{{Graphics[Rectangle[], AspectRatio -> 2], Graphics[Rectangle[]]}, {SpanFromAbove, Graphics[Rectangle[]]}}]An explicit ImageSize setting will prevent this behavior:
GraphicsGrid[{{Graphics[Rectangle[], AspectRatio -> 2, ImageSize -> {100, 100}], Graphics[Rectangle[], ImageSize -> {100, 100}]}, {SpanFromAbove, Graphics[Rectangle[], ImageSize -> {100, 100}]}}]Possible Issues (2)
Spanning regions must be rectangular in shape:
Grid[{{1, SpanFromLeft, 3}, {4, SpanFromAbove, 6}, {7, 8, 9}}, Frame -> All]Use SpanFromBoth when spanning across both columns and rows:
Grid[{{1, SpanFromLeft, 3}, {SpanFromAbove, SpanFromBoth, 6}, {7, 8, 9}}, Frame -> All]See Also
Tech Notes
Related Guides
Related Workflows
- Put Graphics in a Grid ▪
- Make a Grid of Output Data
History
Text
Wolfram Research (2007), SpanFromAbove, Wolfram Language function, https://reference.wolfram.com/language/ref/SpanFromAbove.html.
CMS
Wolfram Language. 2007. "SpanFromAbove." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpanFromAbove.html.
APA
Wolfram Language. (2007). SpanFromAbove. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpanFromAbove.html
BibTeX
@misc{reference.wolfram_2026_spanfromabove, author="Wolfram Research", title="{SpanFromAbove}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/SpanFromAbove.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_spanfromabove, organization={Wolfram Research}, title={SpanFromAbove}, year={2007}, url={https://reference.wolfram.com/language/ref/SpanFromAbove.html}, note=[Accessed: 13-June-2026]}