Skip to content

spy (Series)

Visualise time series observations based on a true-false test

Syntax

[axesHandle, hTrue, hFalse] = spy(x, ...)
[axesHandle, hTrue, hFalse] = spy(range, x, ...)

Input arguments

x [ Series ]

Input time series whose observations that pass or fail a test will be plotted as markers.

range [ Series ]

Date range on which the time series observations will be visualised; if not specified the entire available range will be used.

Output arguments

axesHandle [ Axes ]

Handle to the axes created.

hTrue [ Line ]

Handle to the marks plotted for the observations that pass the test.

hFalse [ Line ]

Handle to the marks plotted for the observations that fail the test.

Options

Interpreter=@auto [ @auto | char | string ]

Value assigned to the axes property TickLabelInterpreter to interpret the strings entered throught Names=; @uato means TickLabelInterpreter will not be changed.

Names={ } [ cellstr ]

Names that will be used to annotate individual columns of the input time series.

ShowTrue=true [ true | false ]

Display marks for the observations that pass the test.

ShowFalse=false [ true | false ]

Display marks for the observations that fail the test.

Squeeze=false [ true | false ]

Adjust the PlotBoxAspecgtRatio property to squeeze the graph.

Test=@isfinite [ function_handle ]ยจ

Test applied to each observations; only the values returning a true will be displayed.

See help on Series/plot and the built-in function spy for all options available.

Description

Examples