plots features extracted from the examplei as a scatter plot.

Details and Options

  • FeatureSpacePlot can be used on many types of data, including numerical, textual, sounds and images, and combinations of these.
  • Each examplei can be a single data element, a list of data elements, an association of data elements, or a Dataset object.
  • When possible, FeatureSpacePlot uses the examplei as the point marker in the scatter plot.
  • The following forms can be used to specify alternative markers:
  • {example1marker1,}examples and markers in a list of rules
    {example1,}{marker1,}examples and markers grouped together
    <|marker1example1,|>association keys as markers
  • Wrappers w can be applied at multiple levels:
  • {,w[examplei],}wrap the value examplei
    w[{example1,example2,}]wrap all the examples
    w1[w2[]]use nested wrappers
  • The following wrappers w can be used for the examplei:
  • Annotation[examplei,label]provide an annotation for the example
    Button[examplei,action]define an action to execute when the example is clicked
    Callout[examplei,label]label the example with a callout
    Callout[examplei,label,pos]place the callout at relative position pos
    EventHandler[examplei,]define a general event handler for the example
    Hyperlink[examplei,uri]make the example a hyperlink
    Labeled[examplei,label]label the example
    Labeled[examplei,label,pos]place the label at relative position pos
    Legended[examplei,label]identify the example in a legend
    PopupWindow[examplei,cont]attach a popup window to the example
    StatusArea[examplei,label]display in the status area on mouseover
    Style[examplei,styles]show the example using the specified styles
    Tooltip[examplei,label]attach a tooltip to the example
    Tooltip[examplei]use example values as tooltips
  • Callout, Labeled, Placed and LabelingFunction can use the following positions pos:
  • Automaticautomatically placed labels
    Above, Below, Before, Afterpositions around the data
    Centeruse the label as the point marker
    xnear the data at a position x
    {pos,epos}epos in label placed at relative position pos of the data
  • FeatureSpacePlot has the same options as Graphics, with the following additions and changes:
  • AspectRatio 1ratio of height to width
    AxesFalsewhether to draw axes
    FeatureExtractor Identityhow to extract features from which to learn
    FeatureNamesAutomaticnames to assign to elements of the examplei
    FeatureTypesAutomaticfeature types to assume for elements of the examplei
    FillingNonehow to fill in stems for each point
    FillingStyleAutomaticstyle to use for filling
    LabelingFunction Automatichow to label points
    LabelingSize Automaticsize of callouts and labels
    MaxPlotPointsAutomaticthe maximum number of points to include
    PerformanceGoal $PerformanceGoalaspects of performance to try to optimize
    PlotLabel Noneoverall label for the plot
    PlotLabelsNonelabels for data
    PlotLegendsNonelegends for data
    PlotMarkers Nonemarkers to use to indicate each point
    PlotRangeAutomaticrange of values to include
    PlotRangeClippingTruewhether to clip at the plot range
    PlotStyle Automaticgraphics directives to determine styles of points
    PlotTheme $PlotThemeoverall theme for the plot
    RandomSeeding 1234how to seed random numbers
  • LabelingFunctionpos places the default labels at the position pos.
  • LabelingFunction->f specifies that each point should have a label given by f[value,index,lbls], where value is the value associated with the point, index is its position in the data and lbls is the list of relevant labels.
  • Possible settings for Method include:
  • Automaticautomatically chosen method
    "LatentSemanticAnalysis"latent semantic analysis method
    "Linear"automatically choose the best linear method
    "LowRankMatrixFactorization"use a low-rank matrix factorization algorithm
    "PrincipalComponentsAnalysis"principal components analysis method
    "TSNE"t-distributed stochastic neighbor embedding algorithm
    "UMAP"uniform manifold approximation and projection


open allclose all

Basic Examples  (6)

Plot the features of the shapes of alphabets:

Plot the features extracted from images:

Change the size of images used as labels:

Use Callout to place labels:

Extract features from a simple dataset:

Provide labels for the data:

Scope  (23)

Data  (5)

Simple examples such as images and text are shown directly in the plot:

Plot features extracted from audio recordings:

Extract features on a mixed-type dataset:

Extract features from a dataset that contains missing values:

Extract features from a dataset formatted as a list of associations:

Wrappers  (9)

Use wrappers on individual examples:

Use wrappers on the entire collection of examples:

Wrappers can be nested:

Use the value of each point as a tooltip:

Label points with automatically positioned text:

Use callouts to label points:

Add tooltips to each point:

Use PopupWindow to provide additional drilldown information:

Button can be used to trigger any action:

Labeling  (5)

Simple examples such as images and text are shown directly in the plot:

Use the examples as tooltips:

Provide labels for the data:

Group all the labels together:

Association keys are used as labels:

Put the labels in tooltips:

Presentation  (4)

Use a gray background for the plot:

Represent the examples as stars in the plot:

Use large purple points:

Use a plot theme with a frame and grid lines:

Combine the detailed theme with a theme that uses open shapes for the points:

Options  (30)

AspectRatio  (4)

By default, FeatureSpacePlot uses the same width and height:

Specify the height to width ratio:

AspectRatioAutomatic determines the ratio from the plot ranges:

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

Background  (2)

By default, plots do not have a background:

Use a light gray background:

FeatureExtractor  (1)

By default, features are automatically chosen based on input type:

Use a different setting:

Use a random position as the feature:

LabelingFunction  (5)

Simple examples such as images and text are shown directly in the plot:

Show the examples as points:

Show the examples as points with the original data in tooltips:

Use Callout to label the points automatically:

Specify the callout placements:

LabelingSize  (4)

Size of labels are determined automatically:

Specify the size of labels:

Specify the size of callout:

Limit the display size for text:

Method  (2)

FeatureSpacePlot uses Method->"UMAP" by default:

Use different methods:

PerformanceGoal  (1)

Generate a plot using flags for countries in Europe:

Use a faster method to position the flags:

PlotLabel  (1)

Add an overall label to the plot:

PlotMarkers  (1)

Change the appearance of the plot markers:

PlotRangePadding  (2)

Increase the padding around the contents of the plot:

Do not add any padding to the plot:

PlotStyle  (2)

Use red points to represent the examples:

Make the points large and red:

PlotTheme  (2)

By default, plots are shown with minimal extra detail:

Use a theme with a dark background and more styled points:

Show labels:

RandomSeeding  (3)

FeatureSpacePlot gives reproducible results:

Use an automatic seed to get different results:

Use specific seeds for reproducible but varying results:

Applications  (1)

Classify a spoken digit command dataset:

All recording labels:

Define a network structure:

Train the network:

Chop the last two levels of the network:

Plot audio features using the output of the chopped net as feature extractor:

Properties & Relations  (1)

FeatureSpacePlot is a combination of DimensionReduce and ListPlot:

Wolfram Research (2017), FeatureSpacePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/FeatureSpacePlot.html (updated 2021).


Wolfram Research (2017), FeatureSpacePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/FeatureSpacePlot.html (updated 2021).


Wolfram Language. 2017. "FeatureSpacePlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/FeatureSpacePlot.html.


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


@misc{reference.wolfram_2022_featurespaceplot, author="Wolfram Research", title="{FeatureSpacePlot}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FeatureSpacePlot.html}", note=[Accessed: 04-June-2023 ]}


@online{reference.wolfram_2022_featurespaceplot, organization={Wolfram Research}, title={FeatureSpacePlot}, year={2021}, url={https://reference.wolfram.com/language/ref/FeatureSpacePlot.html}, note=[Accessed: 04-June-2023 ]}