%% Add Line to Specific Axes
% Call the tiledlayout function to create a 1-by-2 tiled chart layout. Call the nexttile function to create the axes objects ax1 and ax2. Then plot into each of the axes. Add a horizontal line to the first plot by passing ax1 to the yline function.

tiledlayout(1,2)
ax1 = nexttile;
x = -pi/2:pi/60:pi/2;
y1 = tan(sin(x)) + cos(sin(x)); 
plot(ax1,x,y1)

ax2 = nexttile;
x = -pi/2:pi/60:pi/2;
y2 = tan(cos(x)) + exp(x);
plot(ax2,x,y2)

yline(ax1,1.0);

% Copyright 2019 The MathWorks, Inc.