WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

NumberLinePlot [{v1,v2,}]

plots the values vi on a number line.

NumberLinePlot [pred,x]

plots a number line illustrating the region pred.

NumberLinePlot [pred,{x,xmin,xmax}]

plots the number to extend over the interval from xmin to xmax.

NumberLinePlot [{spec1,spec2,},]

plots several number lines.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Data  
Tabular Data  
Presentation  
Options  
AspectRatio  
Axes  
AxesLabel  
Show More Show More
AxesStyle  
ImageSize  
PlotLegends  
PlotRange  
PlotStyle  
PlotTheme  
Spacings  
Ticks  
TicksStyle  
Applications  
Properties & Relations  
See Also
Related Guides
Related Links
History
Cite this Page

NumberLinePlot [{v1,v2,}]

plots the values vi on a number line.

NumberLinePlot [pred,x]

plots a number line illustrating the region pred.

NumberLinePlot [pred,{x,xmin,xmax}]

plots the number to extend over the interval from xmin to xmax.

NumberLinePlot [{spec1,spec2,},]

plots several number lines.

Details and Options

Examples

open all close all

Basic Examples  (5)

Show the first 10 prime numbers on a number line:

Display an interval:

Show where an inequality is true:

Show an infinite interval:

Show several sets on a single number line:

Scope  (9)

Data  (7)

Show multiple sets:

Use Interval and single points:

Group intervals and points into a single list to represent a single set:

Use an inequality:

Use a logical conjunction of equalities and inequalities:

Use a list to represent more than one set:

Use a more complicated inequality:

Tabular Data  (1)

Get tabular data:

Plot petal length in a number line:

Plot elements of both petal and sepal Length as separate number lines:

Include a legend for the plot:

Create columns of petal length per species:

Plot petal lengths grouped by species:

Presentation  (1)

Use a theme with dark background and high-contrast colors:

Use a theme with detailed information:

Options  (43)

AspectRatio  (4)

By default, the ratio of the height to width for the plot is determined automatically:

Make the height the same as the width with AspectRatio 1:

Use numerical value to specify the height-to-width ratio:

AspectRatio Full adjusts the height and width to tightly fit inside other constructs:

Axes  (2)

By default, axes are drawn:

Use Axes False to turn off axes:

AxesLabel  (2)

No axes labels are drawn by default:

Place a label on the axis:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

ImageSize  (7)

Use named sizes such as Tiny , Small , Medium and Large :

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Setting AspectRatio Full will fill the available space:

Use maximum sizes for the width and height:

Use ImageSize Full to fill the available space in an object:

Specify the image size as a fraction of the available space:

PlotLegends  (7)

By default, no legends are used:

Create a legend based on the expressions:

Create a legend with placeholder text:

Create a legend with specific labels:

PlotLegends picks up PlotStyle values automatically:

Use Placed to position legends:

Use LineLegend to modify the appearance of the legend:

PlotRange  (2)

PlotRange is automatically calculated:

Set explicit plot range:

PlotStyle  (3)

By default, different styles are chosen for multiple curves:

Explicitly specify the style for different curves:

Specify styles for the endpoints:

PlotTheme  (1)

Use a theme with simple ticks and bright colors:

Add another theme with legends:

Change the colors:

Spacings  (4)

By default, sets are evenly spaced above the axis:

Use Spacings->None to place the sets on top of one another:

Use Spacings->0 to place all the sets on the axis:

Place the second set close to the first set:

Ticks  (4)

Ticks are placed automatically in each plot:

Use Ticks None to not draw any tick marks:

Place tick marks at specific positions:

Draw tick marks at the specified positions with the specified labels:

TicksStyle  (3)

Specify overall ticks style, including the tick labels:

Specify tick marks with scaled lengths:

Customize each tick with position, length, labeling and styling:

Applications  (6)

Illustrate the domain of a function:

Illustrate the Range of a function:

Visualize the accumulation points of a sequence on the real line:

Show where a function is increasing or decreasing:

Visualize the construction of the Cantor set:

Illustrate the not-so-trivial history of Albert Einstein's citizenship:

Properties & Relations  (3)

Use RegionPlot and RegionPlot3D for showing higher-dimensional regions:

Use ListPlot and ListLinePlot to show numbers as a list of heights:

Use RadialAxisPlot and ParallelAxisPlot to display multidimensional points:

Wolfram Research (2014), NumberLinePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberLinePlot.html (updated 2025).

Text

Wolfram Research (2014), NumberLinePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberLinePlot.html (updated 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_2025_numberlineplot, author="Wolfram Research", title="{NumberLinePlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/NumberLinePlot.html}", note=[Accessed: 24-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_numberlineplot, organization={Wolfram Research}, title={NumberLinePlot}, year={2025}, url={https://reference.wolfram.com/language/ref/NumberLinePlot.html}, note=[Accessed: 24-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /