I am using discrete plot to plot a 1D array. But I want to plot some points specified by a span in one style (for example, in red) and the rest points in other style (e.g. in blue).
$\begingroup$
$\endgroup$
This works pretty like you already said it. You can use Span
to extract any interval of points you like. If you then plot a list of intervals with e.g. ListPlot
, you can style them all differently
data = Table[{x, Sin[x]}, {x, 0, 2 Pi, .1}];
ListPlot[{data[[;; 43]], data[[44 ;;]]},
PlotStyle -> {{Red}, {Blue}}]