Version 1.0
The Horizon Chart is a data visualization technique that displays time-series data in a compact and layered format, improving readability and enabling comparison of multiple datasets over time.
For optimal performance and accurate graphs, please install the Mapping Toolbox .
- horizonChart creates a Horizon Chart x-axis data and y-axis data for each slice
horizonChart(x, y)creates a horizon chart with x an y data and NumBands = 2 i.e. in each of the slices, the data is divided into 2 regions - one above the baseline and one below the baselinehorizonChart(x, y, numBands)creates a horizon chart with x and y data with number of bands = numBands. Number of Bands is the number of sections that the data is divided intohorizonChart(__ , Name, Value)specifies additional options for the horizon chart using one or more name-value pair arguments. Specify the options after all other input arguments.
XDataXData is a 2-D matrix where each column specifies the x-coordinate of data to be displayed in an individual slice of the of the chart.
XDatacan also be a 1-D matrix which can denote the common x-values for each of the subcharts/ individual slices.YDataYData is a 2-D matrix where each column specifies the y-coordinate of data to be displayed in an individual slice of the chart.LabelsA list of labels for each of the slices in the chartNumBandsNumber of Bands/Segments to divide the Horizon chart
ColorAboveBaselineIt is used to determine color gradient that bands above the baseline are shaded with.ColorBelowBaselineIt is used to determine color gradient that bands below the baseline are shaded withXLabelLabel for X-AxisYLabelLabel for Y-AxisTitleTitle for the Horizon Chart
n_stocks = 5;
[y_data, x_data, labels] = GenerateRandomData(n_stocks);
% Create a basic Horizon Chart with 5 Bands(Data is divided into 5 different segments)
basicHorizonChart = horizonChart(x_data, y_data, 5);
