in most of my job I have to repeat something for different part of data, for example making plot, usually the only thing need to change is index. Below is the example of the code which I have to change it manually, I want to know how to use for loop, or another method, to make the change automatically.
Rse1xytyp1 = Select[section1, #[[5]] == 1 &];
se1xytyp1 = SortBy[Rse1xytyp1[[All, {3, 4}]], Last];
Length[se1xytyp1]
se1Arctyp1 = SortBy[Rse1xytyp1[[All, {2, 5}]], Last];
Length[se1Arctyp1]
s1xyplot1 =
ListPlot[se1xytyp1, PlotStyle -> RGBColor[1.0000, 0, 0.3647],
AxesLabel -> {"X", "Y"},
PlotLabels -> Placed[{"Type 1, Section 1"}, Above]];
s1arcplot1 =
ListPlot[se1Arctyp1, PlotStyle -> RGBColor[1.0000, 0, 0.3647],
AxesLabel -> {ArcLength, "Type"},
PlotLabels -> Placed[{"Type 1, Section 1"}, Above]];
In This code, in first line Rse1xytyp1 = Select[section1, #[[5]] == 1 &];
I need to change the #[[5]] == 1 &
from 1 to 15 then plot everything. Also I like to change the plot's names too. How can I do it?
#[[5]] == i &
..., {i,1,15}] $\endgroup$