Graphicsおよび関連する関数のオプションとして使われ,プロットの縦横比を指定する.
AspectRatio
Graphicsおよび関連する関数のオプションとして使われ,プロットの縦横比を指定する.
詳細
- AspectRatioは,最終的な図形のスケールを決定する.
- よく使われる設定
-
Automatic 実際の座標値から縦横比を決定する Full 包み込んでいる領域を満たすようにグラフィックスを引き延ばす a 明示的な縦横比
例題
すべて開く すべて閉じる例 (2)
スコープ (2)
Automaticで比を実際のプロット値から選ぶことができる:
{Plot[Sqrt[1 - x ^ 2], {x, 0, 1}], Plot[Sqrt[1 - x ^ 2], {x, 0, 1}, AspectRatio -> Automatic]}{ParametricPlot[{Cos[u], 1 / 10Sin[u]}, {u, 0, 2Pi}],
ParametricPlot[{Cos[u], 1 / 10Sin[u]}, {u, 0, 2Pi}, AspectRatio -> 1 / 2]}一般化と拡張 (2)
Table[Framed@Graphics3D[Sphere[], AspectRatio -> 1 / k], {k, 1, 3}]Automaticの設定を使って自然の3D投影を保存する:
Table[Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, AspectRatio -> ar], {ar, {Automatic, 2}}]特性と関係 (5)
AspectRatioは,ImageSizeではなくPlotRangeの割合を決める:
Framed[Graphics[{Pink, Disk[]}, PlotRange -> {{-1, 1}, {-1, 1}}, Frame -> True, AspectRatio -> 2, ImageSize -> {200, 100}]]Graphics[{Pink, Disk[]}, PlotRange -> {{-2, 2}, {-1, 1}}, Frame -> True]Plot,ListPlot,ListLinePlotはデフォルトで1/GoldenRatioの比を使う:
{Plot[Sin[x], {x, 0, 2Pi}], Plot[Sin[x], {x, 0, 2Pi}, AspectRatio -> 1 / GoldenRatio]}ParametricPlotやArrayPlotのようなプロットでは,デフォルトでAutomaticが使われる:
ParametricPlot[{u Cos[u], u Sin[u] / 2}, {u, 0, 4Pi}]ArrayPlot[CellularAutomaton[30, {{1}, 0}, 50]]DensityPlotやContourPlotはデフォルトで比1を使う:
DensityPlot[Sin[x] + Cos[y], {x, 0, 10}, {y, 0, 5}]ContourPlot[Sin[x] + Cos[y], {x, 0, 10}, {y, 0, 5}]考えられる問題 (2)
デフォルトで,ParametricPlotは極端な縦横比のグラフィックスを返すことがある:
ParametricPlot[{u, Exp[u]}, {u, 0, 5}]明示的なAspectRatioを使って適切な結果を得る:
ParametricPlot[{u, Exp[u]}, {u, 0, 5}, AspectRatio -> 1 / GoldenRatio]明示的なAspectRatioを使うと形が歪むことがある:
ParametricPlot[{Cos[θ], Sin[θ]}, {θ, 0, 2Pi}, AspectRatio -> 1 / 2]ContourPlot[x ^ 2 + y ^ 2 == 1, {x, -1, 1}, {y, -1, 1}, AspectRatio -> 1 / 2]形の歪みが望ましくない場合はAutomaticを使う:
ParametricPlot[{Cos[θ], Sin[θ]}, {θ, 0, 2Pi}, AspectRatio -> Automatic]ContourPlot[x ^ 2 + y ^ 2 == 1, {x, -1, 1}, {y, -1, 1}, AspectRatio -> Automatic]テクニカルノート
関連するガイド
履歴
1988 で導入 (1.0) | 2007 で更新 (6.0)
テキスト
Wolfram Research (1988), AspectRatio, Wolfram言語関数, https://reference.wolfram.com/language/ref/AspectRatio.html (2007年に更新).
CMS
Wolfram Language. 1988. "AspectRatio." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/AspectRatio.html.
APA
Wolfram Language. (1988). AspectRatio. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AspectRatio.html
BibTeX
@misc{reference.wolfram_2026_aspectratio, author="Wolfram Research", title="{AspectRatio}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/AspectRatio.html}", note=[Accessed: 01-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_aspectratio, organization={Wolfram Research}, title={AspectRatio}, year={2007}, url={https://reference.wolfram.com/language/ref/AspectRatio.html}, note=[Accessed: 01-August-2026]}