Scaled
Details
- Scaled can be used to specify scaled coordinates in any two‐ or three‐dimensional graphics primitive.
- You can use Scaled to represent objects that occupy a fixed region in a plot, independent of the specific range of coordinates in the plot.
- Scaled refers only to the region of a plot defined by its PlotRange and PlotRangePadding. It does not take account of elements such as tick labels, or of margins introduced by ImageMargins.
- Scaled can be used not only for coordinates, but also for scalar length measures such as radii.
- In 2D graphics, Scaled[r] is taken to be relative to the horizontal plot range. In 3D graphics, it is taken to be relative to the diagonal of the 3D bounding box.
- Outside of graphics, Scaled can be used as a setting for options such as BaselinePosition, ContentSize, ImageSize, ItemSize, Spacings and WindowSize.
Examples
open all close allBasic Examples (3)
Positions of objects by fractions of the plot range:
Graphics[{Disk[Scaled[{.2, .4}], 1]}, Frame -> True, PlotRange -> {{0, 10}, {0, 10}}]Graphics3D[{Sphere[Scaled[{.5, .8, .5}], 1]}, PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Axes -> True]Plot range padding by fractions of the plot range:
Plot[Sin[x ^ 2], {x, 0, 10}, PlotRangePadding -> {Scaled[.1], Scaled[.2]}]Cell sizes by a fraction of the document width:
Grid[{{10!, 20!}}, ItemSize -> {{Scaled[.2], Scaled[.5]}}, Frame -> All]Scope (10)
Scaled Positions (3)
Specify coordinates by fractions of the plot range:
Graphics[Rectangle[Scaled[{0, .4}], Scaled[{1, .6}]], Frame -> True, PlotRange -> {{0, 10}, {0, 10}}]Graphics3D[Cuboid[Scaled[{0, .2, .4}], Scaled[{1, .8, .6}]], PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Axes -> True]Specify radii by fractions of the plot range:
Graphics[Disk[{0, 0}, Scaled[.25]], Frame -> True]Graphics[Circle[{0, 0}, Scaled[{.5, .25}]], Frame -> True]Specify the positions of light sources by scales of the plot range:
Graphics3D[Sphere[], Lighting -> {{"Point", Red, Scaled[{2, 0, 0}]}, {"Point", Blue, Scaled[{0, -2, 0}]}, {"Point", Green, Scaled[{0, 0, 2}]}}]Scaled Sizes (4)
Specify ImageSize by a fraction of the enclosing region:
Framed[Pane[Graphics[Circle[], ImageSize -> {Scaled[.3], Scaled[.3]}], {100, 100}]]Specify ItemSize by a fraction of the document width:
Grid[{{50!, 100!}}, ItemSize -> {{Scaled[.3], Scaled[.7]}}, Frame -> All]Specify PlotRangePadding by fractions of the plot range:
Plot3D[Sin[x y ^ 2], {x, 0, 3}, {y, 0, 3}, PlotRangePadding -> {Scaled[.1], Scaled[.2], Scaled[.4]}]Specify the font size according to the width of the plot range:
Table[Graphics[{Inset[Style["M", FontSize -> Scaled[s]]]}, PlotRange -> {{0, 2}, {0, 1}}, Frame -> True, FrameTicks -> False], {s, {.25, .5, 1}}]Scaled Offsets (1)
Scaled radii (2)
In 2D graphics, Scaled radius is taken to be relative to the width of the whole graphic:
Graphics[Circle[{0, 0}, Scaled[.25]], Frame -> True]Graphics[Disk[{0, 0}, Scaled[.25]], Frame -> True]In 3D graphics, it is taken to be relative to the diagonal of the 3D bounding box:
Graphics3D[Sphere[{0, 0, 0}, Scaled[0.25]], Axes -> True, PlotRange -> 1]Graphics3D[Cone[{{0, 0, -1}, {0, 0, 1}}, Scaled[0.25]], Axes -> True, PlotRange -> 1]Graphics3D[Cylinder[{{0, 0, -1}, {0, 0, 1}}, Scaled[0.25]], Axes -> True, PlotRange -> 1]Graphics3D[Tube[{{0, 0, -0.5}, {0, 0, 0.5}}, Scaled[0.1]], Axes -> True, PlotRange -> 1]Applications (1)
Properties & Relations (6)
Scaled is proportional to PlotRange. ImageScaled is proportional to ImageSize:
Table[Framed[Graphics[{Opacity[.1, StandardBlue], EdgeForm[StandardGray], Disk[Scaled[{0.5, 0.5}], Scaled[{0.5, 0.5}]]}, Frame -> True, ImagePadding -> n], FrameMargins -> 0, FrameStyle -> StandardOrange], {n, {0, 20, 40}}]Scaled operates relative to the plot range:
Framed[Graphics[Disk[Scaled[{.2, .2}], .2], Frame -> True]]ImageScaled operates relative to the whole image:
Framed[Graphics[Disk[ImageScaled[{.2, .2}], .2], Frame -> True]]Scaled coordinates do not have to be between 0 and 1:
Framed[Graphics[Disk[Scaled[{-.5, .5}], .2], Frame -> True]]Framed[Graphics[Disk[Scaled[{2, .5}], .2], Frame -> True]]In 2D the transformation from world coordinates to Scaled coordinates is given by:
RescalingTransform[{{xmin, xmax}, {ymin, ymax}}, {{0, 1}, {0, 1}}][{x, y}]From Scaled to world coordinates:
RescalingTransform[{{0, 1}, {0, 1}}, {{xmin, xmax}, {ymin, ymax}}][{sx, sy}]In 3D the transformation from world coordinates to Scaled coordinates is given by:
RescalingTransform[{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}, {{0, 1}, {0, 1}, {0, 1}}][{x, y, z}]From Scaled to world coordinates:
RescalingTransform[{{0, 1}, {0, 1}, {0, 1}}, {{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}][{sx, sy, sz}]Possible Issues (2)
Objects with Scaled coordinates outside 0 and 1 may not be displayed in 3D:
Graphics3D[Sphere[Scaled[{1.5, .5, .5}], 1], Axes -> True]Using Scaled sizes will depend on the PlotRange:
Table[Graphics[Disk[{0, 0}, Scaled[.25]], PlotRange -> {{-n, n}, {-1, 1}}, Frame -> True, FrameTicks -> {{{-1, 1}, None}, {{-n, n}, None}}], {n, {1, 2, 3}}]See Also
Related Guides
Related Workflows
- Inset One Graphic into Another
History
Introduced in 1988 (1.0) | Updated in 2008 (7.0)
Text
Wolfram Research (1988), Scaled, Wolfram Language function, https://reference.wolfram.com/language/ref/Scaled.html (updated 2008).
CMS
Wolfram Language. 1988. "Scaled." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Scaled.html.
APA
Wolfram Language. (1988). Scaled. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Scaled.html
BibTeX
@misc{reference.wolfram_2026_scaled, author="Wolfram Research", title="{Scaled}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Scaled.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_scaled, organization={Wolfram Research}, title={Scaled}, year={2008}, url={https://reference.wolfram.com/language/ref/Scaled.html}, note=[Accessed: 13-June-2026]}