ImageScaled[{x,y}]
グラフィカルオブジェクトの位置を,画像全域において各方向に0から1までスケールした座標を使って返す.
ImageScaled[{dx,dy},{x0,y0}]
実座標{x0,y0}から始め,次に画像をスケールされたオフセット{dx,dy}で移動して得られた位置を返す.
ImageScaled
ImageScaled[{x,y}]
グラフィカルオブジェクトの位置を,画像全域において各方向に0から1までスケールした座標を使って返す.
ImageScaled[{dx,dy},{x0,y0}]
実座標{x0,y0}から始め,次に画像をスケールされたオフセット{dx,dy}で移動して得られた位置を返す.
詳細
- ImageScaledは任意の2Dグラフィックスプリミティブにおけるスケールされた座標の指定に使うことができる.
- グラフィックスと関連した画像中の定められた領域を占めているオブジェクトは,ImageScaledを使って表すことができる.
- ImageScaledを定義するために使われた画像領域は,グラフィックスが実際に描画される領域のみを含む.ImageSizeとAspectRatioの間の形の不一致によって生じた空白スペースやImageMarginsによって定義された空白スペースは含まない.
- ImageScaled は,座標だけでなく,半径などのスカラーの長さの尺度にも用いることが可能である.
例題
すべて開く すべて閉じる例 (2)
スコープ (4)
ImageScaledの位置 (3)
Graphics[Rectangle[ImageScaled[{0, .4}], ImageScaled[{1, .6}]], Frame -> True, PlotRange -> {{0, 10}, {0, 10}}]Graphics[Disk[{0, 0}, ImageScaled[{.5, .25}]], Frame -> True]Graphics3D[Sphere[], Lighting -> {{"Directional", Red, ImageScaled[{2, 2, 2}]}, {"Directional", Blue, ImageScaled[{-2, -2, 2}]}, {"Directional", Green, ImageScaled[{-2, 2, 2}]}}]アプリケーション (1)
wm[pos_] := Text[Style[Grid[Table["xyz", {i, 5}, {j, 5}], Spacings -> {.3, .3}], Large, Bold, Opacity[.1]], pos, {0, 0}, {2, 1}]Plot[Sin[x], {x, 0, 2Pi}, ImagePadding -> 20, Epilog -> wm[ImageScaled[{.5, .5}]], PlotRangeClipping -> False]特性と関係 (4)
ScaledはPlotRangeに比例し,ImageScaledはImageSizeに比例する:
Table[Framed[Graphics[{Opacity[.1, StandardBlue], EdgeForm[StandardGray], Disk[ImageScaled[{0.5, 0.5}], ImageScaled[{0.5, 0.5}]]}, Frame -> True, ImagePadding -> n], FrameMargins -> 0, FrameStyle -> StandardOrange], {n, {0, 20, 40}}]ImageScaledは画像全体と相対的に作用する:
Framed[Graphics[Disk[ImageScaled[{.2, .2}], .2], Frame -> True], FrameMargins -> None]Scaledはプロット範囲と相対的に作用する:
Framed[Graphics[Disk[Scaled[{.2, .2}], .2], Frame -> True], FrameMargins -> None]PlotRangeClippingをTrueに設定すると,プロット範囲(PlotRange)の外側のオブジェクトは切り取られる:
Table[Framed[Graphics[Disk[ImageScaled[{.2, .2}], .3], Frame -> True, PlotRangeClipping -> prc], FrameMargins -> None], {prc, {False, True}}]考えられる問題 (3)
0と1の外側の画像をスケールした座標のオブジェクトは表示されないことがある:
Graphics[Disk[ImageScaled[{1.5, .5}], 1], Frame -> True]デフォルトで,プロット関数についてPlotRangeClippingはTrueに設定されている:
Plot[Sin[x ^ 2], {x, 0, 5}, Epilog -> Style[Text[Sin[x ^ 2], ImageScaled[{0.5, 0.15}], {0, 1}, Background -> StandardGray], Medium], Frame -> True]Falseを使ってプロット範囲(PlotRange)外のオブジェクトとも含むようにする:
Plot[Sin[x ^ 2], {x, 0, 5}, Epilog -> Style[Text[Sin[x ^ 2], ImageScaled[{0.5, 0.15}], {0, 1}, Background -> StandardGray], Medium], Frame -> True, PlotRangeClipping -> False]ImageScaledサイズを使うとグラフィックスの外観がImageSizeとAspectRatioに依存するようになる:
Table[Graphics[Disk[ImageScaled[{.5, .5}], ImageScaled[{.25, .25}]], Frame -> True, FrameTicks -> {{{-1, 1}, None}, {{-1, 1}, None}}, ImageSize -> n], {n, {50, 70, 100}}]Table[Graphics[Disk[ImageScaled[{.5, .5}], ImageScaled[{.25, .25}]], Frame -> True, FrameTicks -> {{{-1, 1}, None}, {{-1, 1}, None}}, ImageSize -> 100, AspectRatio -> n], {n, {1, 1 / 2, 1 / 3}}]関連するガイド
関連するワークフロー
- グラフィックスを別のグラフィックスに挿入する
テキスト
Wolfram Research (2007), ImageScaled, Wolfram言語関数, 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_2026_imagescaled, author="Wolfram Research", title="{ImageScaled}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ImageScaled.html}", note=[Accessed: 01-July-2026]}
BibLaTeX
@online{reference.wolfram_2026_imagescaled, organization={Wolfram Research}, title={ImageScaled}, year={2007}, url={https://reference.wolfram.com/language/ref/ImageScaled.html}, note=[Accessed: 01-July-2026]}