NumberLinePlot[{v1,v2,…}]
数直線上に viの値をプロットする.
NumberLinePlot[pred,x]
領域 pred を図示する数直線をプロットする.
NumberLinePlot[pred,{x,xmin,xmax}]
xminから xmaxまでの区間を超える数をプロットする.
NumberLinePlot[{spec1,spec2,…},…]
複数の数直線をプロットする.
NumberLinePlot
NumberLinePlot[{v1,v2,…}]
数直線上に viの値をプロットする.
NumberLinePlot[pred,x]
領域 pred を図示する数直線をプロットする.
NumberLinePlot[pred,{x,xmin,xmax}]
xminから xmaxまでの区間を超える数をプロットする.
NumberLinePlot[{spec1,spec2,…},…]
複数の数直線をプロットする.
詳細とオプション
- viは,数,Intervalオブジェクト,Aroundオブジェクト,あるいはそれらのリストでよい.
- 述語 pred は不等式の任意の論理結合でよい.
- speciは,数,区間,記号述語でよい.
- NumberLinePlot[Tabular[…]cspec]は,列指定 cspec を使って表オブジェクトから値を抽出し,これをプロットする.
- 次は,表データのプロットに使用可能な列指定 cspec の形式である.
-
col 列 col からの値をプロットする {col1,col2,…,coln} 列{col1, …, coln}を値の集合としてプロットする - NumberLinePlotには,Graphicsと同じオプションに次を加えたものを使うことができる. [全オプションのリスト]
-
AspectRatio Automatic 縦横比 IntervalMarkers Automatic 不確かさをどのように描画するか IntervalMarkersStyle Automatic 不確かな要素のスタイル PlotLegends None 集合の凡例 PlotStyle Automatic スタイルを指定するグラフィックス指示子 PlotTheme $PlotTheme プロットの全体的なテーマ Spacings Automatic リスト pred 中の異なる集合を異なる高さでプロットするかどうか - ColorData["DefaultPlotColors"]は,PlotStyleで使われるデフォルトの色のシーケンスを与える.
- Spacings->Automaticのデフォルト設定は,speciを軸の上に等間隔で置く.
- Spacings->{s1,s2,…}は,spec1を軸から s1の距離に,spec2を spec1から s2の距離に,という具合に置く.
- Spacings->n はSpacings->{n,n,…}と同等である.
- Spacings->Noneは,すべての speciを軸の上の同じ高さに置く.
- デフォルト設定のAspectRatio->Automaticでは,割合は speciのレイアウトに基づいて選ばれる.
全オプションのリスト
例題
すべて開く すべて閉じる例 (5)
NumberLinePlot[Prime[Range[10]]]NumberLinePlot[Interval[{0, 1}]]NumberLinePlot[Sin[x] < Cos[x], {x, 0, 2Pi}]NumberLinePlot[Interval[{0, ∞}]]NumberLinePlot[{Range[20], 2Range[10], 3Range[6], 5Range[4], 7 Range[2]}]スコープ (9)
データ (7)
NumberLinePlot[{{Interval[{0, 1}]}, Interval[{0, 2}]}]Intervalおよび単一の点を使う:
NumberLinePlot[{Interval[{0, 1}], 2, Interval[{0, 2}]}]NumberLinePlot[{{Interval[{0, 1}], 2}, Interval[{0, 2}]}]NumberLinePlot[0 < x ≤ 1, x]NumberLinePlot[-2 ≤ x < 1 || x == 2 || x > 3, x]NumberLinePlot[{-2 ≤ x < 1 || x > 3, x == 2}, x]NumberLinePlot[x ^ 3 < Sin[13x], x]表形式データ (1)
tabular = ResourceData["Sample Tabular Data: Fisher Iris"]NumberLinePlot[tabular -> "PetalLength"]NumberLinePlot[tabular -> {"PetalLength", "SepalLength"}]NumberLinePlot[tabular -> {"PetalLength", "SepalLength"}, PlotLegends -> {"petal", "sepal"}]pivot = PivotToColumns[tabular, "Species" -> "PetalLength"]NumberLinePlot[pivot -> {"setosa", "versicolor", "virginica"}, PlotLegends -> {"setosa", "versicolor", "virginica"}]オプション (43)
AspectRatio (4)
NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}]AspectRatio1として高さと幅を等しくする:
NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 1]NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 1 / 2]AspectRatioFullとすると,他の構造物内にぴったり納まるように高さと幅が調整される:
plot = NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> Full];{Framed[Pane[plot, {50, 100}]], Framed[Pane[plot, {100, 100}]], Framed[Pane[plot, {100, 50}]]}Axes (2)
AxesLabel (2)
AxesStyle (4)
NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AxesStyle -> Red]NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AxesStyle -> Directive[Thick, Red]]NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AxesStyle -> Green, TicksStyle -> StandardGray]NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AxesStyle -> Green, LabelStyle -> StandardGray]ImageSize (7)
Tiny,Small,Medium,Largeのような名前付きのサイズを使う:
{NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> Tiny], NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> Small]}{NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> 150], NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 1.5, ImageSize -> 150]}{NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> {Automatic, 50}], NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 2, ImageSize -> {Automatic, 50}]}{NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> UpTo[200]], NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 2, ImageSize -> UpTo[200]]}グラフィックスの幅と高さを指定して,必要な場合はスペースで充填する:
NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> {200, 200}, Background -> StandardBrown]AspectRatioFullと設定すると,使用可能なスペースが塗り潰される:
NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> Full, ImageSize -> {200, 200}, Background -> StandardBrown]{NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> {UpTo[150], UpTo[100]}], NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}ImageSizeFullを使ってオブジェクト内の使用可能なスペースを塗り潰す:
Framed[Pane[NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, ImageSize -> Full, Background -> StandardBrown], {200, 100}]]Framed[Pane[NumberLinePlot[{x^2 > 1, Tan[x] ≠ 0, Sin[x] > 0}, {x, -7, 7}, AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> StandardBrown], {200, 100}]]PlotLegends (7)
NumberLinePlot[{x < 0, x > 0}, x]NumberLinePlot[{x < 0, x > 0}, x, PlotLegends -> "Expressions"]NumberLinePlot[{x < 0, x > 0}, x, PlotLegends -> Automatic]NumberLinePlot[{x < 0, x > 0}, x, PlotLegends -> {"one", "two"}]PlotLegendsは,自動的にPlotStyleの値を拾う:
NumberLinePlot[{x < 1, x > 1}, x, PlotStyle -> {{Red, Dashed}, Blue}, PlotLegends -> Automatic]Placedを使って凡例の位置を決める:
NumberLinePlot[{x < 1, x > 1}, x, PlotLegends -> Placed[Automatic, Below]]LineLegendを使って凡例の外観に変更を加える:
NumberLinePlot[{x < 1, x > 1}, x, PlotLegends -> LineLegend["Expressions", LegendFunction -> "Frame"]]PlotRange (2)
PlotRangeは自動的に計算される:
NumberLinePlot[Range@10]NumberLinePlot[Range@10, PlotRange -> {{4, 6}, All}]PlotStyle (3)
デフォルトで,複数の曲線がある場合にはそれぞれに異なるスタイルが使われる:
NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, PlotStyle -> {Red, Blue, Green}]NumberLinePlot[{x == 0 || 1 < x ≤ 2, 0 ≤ x < 1 || x == 2}, x, PlotStyle -> {Directive[Thick, Red, PointSize[Large]], Directive[Dashed, Blue, PointSize[Medium]]}, AspectRatio -> 1 / 4]PlotTheme (1)
NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, PlotTheme -> "Business"]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, PlotTheme -> {"Detailed", "Business"}]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, PlotTheme -> {"Detailed", "Business"}, PlotStyle -> {RGBColor[0.468742, 0., 0.0158236], RGBColor[0.7514516, 0.09778, 0.0063294399999999995], RGBColor[0.9108294, 0.2745386, 0.020955220000000004], RGBColor[0.9819778, 0.4844202000000001, 0.05144122000000002], RGBColor[1., 0.6815686, 0.08952772000000002], RGBColor[1., 0.820127, 0.126955]}]Spacings (4)
NumberLinePlot[{x ^ 2 > 1, x ^ 2 > 3}, {x, -4, 4}]Spacings->Noneを使って,集合を他の集合の上に重ねる:
NumberLinePlot[{x ^ 2 > 1, x ^ 2 > 3}, {x, -4, 4}, Spacings -> None]Spacings->0を使って全集合を軸の上に重ねる:
NumberLinePlot[{x ^ 2 > 1, x ^ 2 > 3}, {x, -4, 4}, Spacings -> 0]NumberLinePlot[{x ^ 2 > 1, x ^ 2 > 3}, {x, -4, 4}, Spacings -> {1, 0.5}]Ticks (4)
NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, Ticks -> None]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, Ticks -> {{-2, 0, 2}, Automatic}]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, Ticks -> {{{-2, -a}, {0, b}, {2, a}}, Automatic}]TicksStyle (3)
NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, TicksStyle -> Directive[Red, 12]]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, Ticks -> {{{-2, -a, .1}, {0, b, .05}, {2, a, .25}}, Automatic}]NumberLinePlot[Table[x ^ 2 > k, {k, 0, 5}], x, Ticks -> {{{-2, -a, .15, Directive[Thick, Darker@Green]}, {0, b, .05, Directive[Blue]}, {2, a, .25, Directive[Dashed, Thick, Purple]}}, Automatic}]アプリケーション (6)
FunctionDomain[Sqrt[1 - x ^ 2], x]NumberLinePlot[%, x]関数のRangeを示す:
FunctionRange[(E^x/x), x, y]NumberLinePlot[%, {y, -5, 5}]ϕ[n_] := Cos[Pi n]ArcTan[n](2 / Pi + Sin[n] / n)NumberLinePlot[{Table[ϕ[n], {n, 1, 300}]}, PlotStyle -> Directive[StandardGreen, PointSize[Small], Opacity[.2]]]f[x_] := 2x ^ 3 + 3x ^ 2 - 12x + 5Show[{Plot[f[x], {x, -3, 3}, PlotStyle -> StandardGray], NumberLinePlot[{Derivative[1][f][x] > 0, Derivative[1][f][x] < 0, Derivative[1][f][x] == 0}, {x, -3, 3}, PlotStyle -> {Red, Blue, StandardGray}, Spacings -> 0, PlotLegends -> {"Increasing", "Decreasing", "Stationary"}]}]NumberLinePlot[NestList[# /. {a_, b_} :> Sequence[{a, 0.6 a + 0.4 b}, {0.4 a + 0.6 b, b}]&, Interval[{0, 1}], 5], {x, 0, 1}, AspectRatio -> 1, PlotStyle -> PointSize[0], PlotRangePadding -> Scaled[0.1]]アルバート・アインシュタイン(Albert Einstein)の市民権の変遷:
data = {{Interval[{1879, 1896}], "Kingdom of Württemberg - German Empire"}, {Interval[{1896, 1901}], "Stateless"}, {Interval[{1901, 1955}], "Switzerland"}, {Interval[{1911, 1912}], "Austria - Austro-Hungarian Empire"}, {Interval[{1914, 1918}], "Kingdom of Prussia - German Empire"}, {Interval[{1918, 1933}], "Free State of Prussia - Weimar Republic"}, {Interval[{1940, 1955}], "United States"}};NumberLinePlot[data[[All, 1]], PlotLegends -> data[[All, -1]], AspectRatio -> .7]特性と関係 (3)
高次元を示すためにRegionPlotとRegionPlot3Dを使う:
{NumberLinePlot[Norm[{x}] ≤ 1, {x, -2, 2}], RegionPlot[Norm[{x, y}] ≤ 1, {x, -2, 2}, {y, -2, 2}], RegionPlot3D[Norm[{x, y, z}] ≤ 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]}数を高さのリストとして示すためにListPlotとListLinePlotを使う:
{NumberLinePlot[Prime[Range[10]]], ListPlot[Prime[Range[10]]], ListLinePlot[Prime[Range[10]]]}RadialAxisPlotとParallelAxisPlotを使って多次元の点を表示する:
{NumberLinePlot[{1, 2, 5, 3, 7}], RadialAxisPlot[{1, 2, 5, 3, 7}], ParallelAxisPlot[{1, 2, 5, 3, 7}]}テキスト
Wolfram Research (2014), NumberLinePlot, Wolfram言語関数, https://reference.wolfram.com/language/ref/NumberLinePlot.html (2025年に更新).
CMS
Wolfram Language. 2014. "NumberLinePlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/NumberLinePlot.html.
APA
Wolfram Language. (2014). NumberLinePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberLinePlot.html
BibTeX
@misc{reference.wolfram_2026_numberlineplot, author="Wolfram Research", title="{NumberLinePlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/NumberLinePlot.html}", note=[Accessed: 03-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_numberlineplot, organization={Wolfram Research}, title={NumberLinePlot}, year={2025}, url={https://reference.wolfram.com/language/ref/NumberLinePlot.html}, note=[Accessed: 03-November-2026]}