%% Change Individual Plots to Scatter and Stair Plots
% The stackedplot function returns a StackedLineChart object. You can use it to set the same property value for all plots, or to set different property values for individual plots. In this example, first change the line widths for all plots in a stacked plot. Then, use the PlotType property of individual plots, so that the stacked plot has a line plot, scatter plot, and stair plot.
% Load a timetable that has a set of weather measurements.

load outdoors
outdoors(1:3,:)

%
% Create a stacked plot and return a StackedLineChart object.

s = stackedplot(outdoors)

%
% The object provides access to many properties that apply to all of the plots. For example, you can use s.LineWidth to make the lines wider.

s.LineWidth = 2;

%
% The object also provides access to arrays of objects that you can use to modify the lines and y-axes for individual plots. To access properties of individual lines, use s.LineProperties. For each plot, you can specify a different line style, marker, plot type, and so on.

s.LineProperties

%
% Change the second plot to a scatter plot, and the third plot to a stair plot, using the PlotType property.

s.LineProperties(2).PlotType = 'scatter';
s.LineProperties(3).PlotType = 'stairs';

%
% You also can access individual y-axes through the s.AxesProperties property.

s.AxesProperties

%
% Copyright 2018 The MathWorks, Inc.