Seems to be a mess, but maybe this gives some ideas
Names Default To Here(1);
cols = {"wx0b5t", "wx0bgw", "wx0c0y", "wx0c0z", "wx0cfl", "wx0cfn", "WX0AZN", "WX0c03", "WX0C0X", "WX0CFM", "WX0cow"};
dt = Open("$DOWNLOADS/Guardband table_for_reprex2.jmp");
gb = dt << Graph Builder(
Transform Column("Row", Formula(Row())),
Size(1149, 561),
Show Control Panel(0),
Variables(
X(:Row),
Y(:wx0b5t),
Y(:"OOC - wx0b5t"n, Position(1)),
Y(:wx0bgw, Position(1)),
Y(:"OOC - wx0bgw"n, Position(1)),
Y(:wx0c0y, Position(1)),
Y(:"OOC - wx0c0y"n, Position(1)),
Y(:wx0c0z, Position(1)),
Y(:"OOC - wx0c0z"n, Position(1)),
Y(:wx0cfl, Position(1)),
Y(:"OOC - wx0cfl"n, Position(1)),
Y(:wx0cfn, Position(1)),
Y(:"OOC - wx0cfn"n, Position(1)),
Y(:WX0AZN, Position(1)),
Y(:"OOC - WX0AZN"n, Position(1)),
Y(:WX0c03, Position(1)),
Y(:"OOC - WX0c03"n, Position(1)),
Y(:WX0C0X, Position(1)),
Y(:"OOC - WX0C0X"n, Position(1)),
Y(:WX0CFM, Position(1)),
Y(:"OOC - WX0CFM"n, Position(1)),
Y(:WX0cow, Position(1)),
Y(:"OOC - WX0cow"n, Position(1))
),
Elements(
Line(
X,
Y(1),
Y(2),
Y(3),
Y(4),
Y(5),
Y(6),
Y(7),
Y(8),
Y(9),
Y(10),
Y(11),
Y(12),
Y(13),
Y(14),
Y(15),
Y(16),
Y(17),
Y(18),
Y(19),
Y(20),
Y(21),
Y(22),
Legend(16),
Error Interval("None"),
Missing Values("No Connection")
)
),
SendToReport(
Dispatch({}, "Row", ScaleBox, {Min(0), Max(1136), Inc(10), Minor Ticks(4), Label Row(Label Orientation("Angled"))}),
Dispatch({}, "400", ScaleBox,
{Legend Model(
16,
Properties(0, {Line Width(1)}, Item ID("wx0b5t", 1)),
Properties(1, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0b5t", 1)),
Properties(2, {Line Width(1)}, Item ID("wx0bgw", 1)),
Properties(3, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0bgw", 1)),
Properties(4, {Line Width(1)}, Item ID("wx0c0y", 1)),
Properties(5, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0c0y", 1)),
Properties(6, {Line Width(1)}, Item ID("wx0c0z", 1)),
Properties(7, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0c0z", 1)),
Properties(8, {Line Width(1)}, Item ID("wx0cfl", 1)),
Properties(9, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0cfl", 1)),
Properties(10, {Line Width(1)}, Item ID("wx0cfn", 1)),
Properties(11, {Line Color(3), Line Width(1)}, Item ID("OOC - wx0cfn", 1)),
Properties(12, {Line Width(1)}, Item ID("WX0AZN", 1)),
Properties(13, {Line Color(3), Line Width(1)}, Item ID("OOC - WX0AZN", 1)),
Properties(14, {Line Width(1)}, Item ID("WX0c03", 1)),
Properties(15, {Line Color(3), Line Width(1)}, Item ID("OOC - WX0c03", 1)),
Properties(16, {Line Width(1)}, Item ID("WX0C0X", 1)),
Properties(17, {Line Color(3), Line Width(1)}, Item ID("OOC - WX0C0X", 1)),
Properties(18, {Line Width(1)}, Item ID("WX0CFM", 1)),
Properties(19, {Line Color(3), Line Width(1)}, Item ID("OOC - WX0CFM", 1)),
Properties(20, {Line Width(1)}, Item ID("WX0cow", 1)),
Properties(21, {Line Color(3), Line Width(1)}, Item ID("OOC - WX0cow", 1))
)}
),
Dispatch({}, "graph title", TextEditBox, {Set Text("Reproducible example")}),
Dispatch({}, "X title", TextEditBox, {Set Text("Time [min]")}),
Dispatch({}, "Y title", TextEditBox, {Set Text("Y")}),
Dispatch({}, "Graph Builder", FrameBox, {Background Color(-14605016), Marker Size(0), Marker Drawing Mode("Normal")}),
Dispatch({}, "400", LegendBox,
{Legend Position({16, [0, -1, 1, -1, 2, -1, 3, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, -1]})}
)
)
);
s = gb << get script;
l_model = Try(Arg(Extract Expr(s, Legend(Wild()))), .);
hide_column_line = function({gb, cols_to_show}, {Default Local},
l_server = gb << Get Legend Server;
server_items = (lgnd << Get Legend Items)[1];
l_display = gb << Get Legend Display;
display_items = l_display << get items;
For(i = 1, i <= N Items(server_items), i++,
item = Eval(EvalExpr(l_server << Get Legend Item(Expr(l_model), Expr(i))));
If(!Contains(cols_to_show, item << Get Label),
item << Set Properties({Transparency(0)});
display_items[i] << Set Visible(0);
,
item << Set Properties({Transparency(1)});
display_items[i] << Set Visible(1);
);
);
);
wait(1);
hide_column_line(gb, cols[1]);
wait(1);
hide_column_line(gb, cols[3::6]);
wait(1);
hide_column_line(gb, cols);
-Jarmo