Skip to content

RasterBox ​

A pixel grid in a drawing's coordinates: one color per cell in Colors, spread over DataRange.

Wolfram LanguageRasterBox
RasterBox(options)A pixel grid in a drawing's coordinates: one color per cell in Colors, spread over DataRange.
Typed signatures
TypePackageApplies
(expression*) -> boxesboxesalways

Domain: Boxes

Details
  • A Wolfram Raster in a Graphics; DensityPlot, ListDensityPlot, a filled ContourPlot and ComplexPlot lower to one inside a GraphicsBox.
  • Colors are rows of colors, the first row at the least y of DataRange (((xmin, xmax), (ymin, ymax))), each row left to right. A cell that is not a color is left clear. Colors are resolved before the box is built, so a drawer needs no gradient table.
  • A raster with a Producer holds no cells: the environment fills it from the expression its GraphicsBox holds (ComplexPlot's WebGPU shader on the web, a CPU evaluation elsewhere).
  • Prints as -Graphics- in text, as Wolfram does.
  • Wolfram writes the cells and the corners positionally (RasterBox[data, ((xmin, ymin), (xmax, ymax)), (zmin, zmax)]) and colors them with a ColorFunction; here they ride as options.

Examples

Basic #

a box is inert: it evaluates to itself

live ↗
InRasterBox((DataRange,[[0,1],[0,1]]))\mathrm{RasterBox}((\mathrm{DataRange},\bigl\lbrack\bigl\lbrack0, 1\bigr\rbrack, \bigl\lbrack0, 1\bigr\rbrack\bigr\rbrack))OutRasterBox((DataRange,[[0,1],[0,1]]))\mathrm{RasterBox}((\mathrm{DataRange},\bigl\lbrack\bigl\lbrack0, 1\bigr\rbrack, \bigl\lbrack0, 1\bigr\rbrack\bigr\rbrack))
About
Examples1
CrosswalkWolfram Language

See also: GraphicsBox, PolygonBox