ImageScaled

ImageScaled[{x,y}]

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

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

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

Details

  • ImageScaled can be used to specify scaled coordinates in any two-dimensional graphics primitive.
  • You can use ImageScaled to represent objects that occupy a fixed region in the image associated with a graphic.
  • The image region used to define ImageScaled includes only the region in which the graphic can actually be drawn. It does not include empty space arising from mismatches in shape between ImageSize and AspectRatio, or defined by ImageMargins.

Examples

open allclose all

Basic Examples  (2)

Positions of objects by fractions of the whole image:

Radii by fractions of the whole image:

Scope  (4)

ImageScaled Positions  (3)

Specify coordinates by fractions of the whole image:

Specify the radii by fractions of the whole image:

Specify the positions of light sources in the view coordinate system pointing to the center:

ImageScaled Offsets  (1)

Specify image-scaled offsets from the ordinary coordinates:

Applications  (1)

Place a watermark on top of the graphic:

Properties & Relations  (4)

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

ImageScaled operates relative to the whole image:

Scaled operates relative to the plot range:

With PlotRangeClipping set to True, objects outside of the PlotRange will be clipped:

Possible Issues  (3)

Objects with image-scaled coordinates outside 0 and 1 may not be displayed:

By default PlotRangeClipping is set to True for plot functions:

Use False to include objects outside of the PlotRange:

Using ImageScaled sizes, the appearance of the graphic will depend on the ImageSize and AspectRatio:

Wolfram Research (2007), ImageScaled, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageScaled.html.

Text

Wolfram Research (2007), ImageScaled, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageScaled.html.

CMS

Wolfram Language. 2007. "ImageScaled." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImageScaled.html.

APA

Wolfram Language. (2007). ImageScaled. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageScaled.html

BibTeX

@misc{reference.wolfram_2023_imagescaled, author="Wolfram Research", title="{ImageScaled}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ImageScaled.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_imagescaled, organization={Wolfram Research}, title={ImageScaled}, year={2007}, url={https://reference.wolfram.com/language/ref/ImageScaled.html}, note=[Accessed: 19-March-2024 ]}