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 , then moving by a scaled offset .

DetailsDetails

  • 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 width of the whole graphic. In 3D graphics, it is taken to be relative to the diagonal of the 3D bounding box.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Positions of objects by fractions of the plot range:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Plot range padding by fractions of the plot range:

In[1]:=
Click for copyable input
Out[1]=

Cell sizes by a fraction of the document width:

In[1]:=
Click for copyable input
Out[1]=
New in 1 | Last modified in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »