Scaled

Scaled[{x,y,}]

gives the position of a graphical object in terms of coordinates scaled to run from 0 to 1 across the whole plot range in each direction.

Scaled[{dx,dy,},{x0,y0,}]

gives a position obtained by starting at ordinary coordinates {x0,y0,}, then moving by a scaled offset {dx,dy,}.

Details

• Scaled can be used to specify scaled coordinates in any two or threedimensional 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 width of the whole graphic. In 3D graphics, it is taken to be relative to the diagonal of the 3D bounding box.

Examples

open allclose all

Basic Examples(3)

Positions of objects by fractions of the plot range:

Plot range padding by fractions of the plot range:

Cell sizes by a fraction of the document width:

Scope(10)

Scaled Positions(3)

Specify coordinates by fractions of the plot range:

Specify radii by fractions of the plot range:

Specify the positions of light sources by scales of the plot range:

Scaled Sizes(4)

Specify ImageSize by a fraction of the enclosing region:

Specify ItemSize by a fraction of the document width:

Specify PlotRangePadding by fractions of the plot range:

Specify the font size according to the width of the plot range:

Scaled Offsets(1)

Specify scaled offsets from the ordinary coordinates:

In 2D graphics, Scaled radius is taken to be relative to the width of the whole graphic:

In 3D graphics, it is taken to be relative to the diagonal of the 3D bounding box:

Applications(1)

Place text at the top right-hand corners:

Properties & Relations(6)

Scaled is proportional to PlotRange. ImageScaled is proportional to ImageSize:

Scaled operates relative to the plot range:

ImageScaled operates relative to the whole image:

Scaled coordinates do not have to be between 0 and 1:

In 2D the transformation from world coordinates to Scaled coordinates is given by:

From Scaled to world coordinates:

In 3D the transformation from world coordinates to Scaled coordinates is given by:

From Scaled to world coordinates:

Possible Issues(3)

Objects with Scaled coordinates outside 0 and 1 may not be displayed in 3D:

Using Scaled sizes will depend on the PlotRange:

Using automatic plot range with Scaled may cause an ambiguity:

Having objects in the graphic with nonscaled coordinates will disambiguate the scale:

Using a fixed plot range will also disambiguate the scale:

Wolfram Research (1988), Scaled, Wolfram Language function, https://reference.wolfram.com/language/ref/Scaled.html (updated 2008).

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_2024_scaled, author="Wolfram Research", title="{Scaled}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Scaled.html}", note=[Accessed: 24-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_scaled, organization={Wolfram Research}, title={Scaled}, year={2008}, url={https://reference.wolfram.com/language/ref/Scaled.html}, note=[Accessed: 24-April-2024 ]}