I need to plot two datasets on the same plot. The datasets have the same x-range. However, I want to show only parts of the plot.
A minimal example would be
h = π/100.;
i1 = ListLinePlot[Table[{i*h, Sin[i*h]}, {i, 0, 100}], PlotStyle -> Red];
i2 = ListLinePlot[Table[{i*h, Cos[i*h]}, {i, 0, 100}], PlotStyle -> Blue];
l1 = Graphics[{Black, Dashed, Line[{{π/2, -1}, {π/2, 1}}]}];
Show[{i1, i2, l1}, PlotRange -> All]
The output is the following
But, the plot I want is
Can anyone please help? Thanks in advance.
ColorFunction
option and set toWhite
the parts you don't want to show. $\endgroup$