You could use associative array to save the settings (most likely best would be to use associative array inside associative array, but I got lazy), then use Fit Where with EvalEvalExpr. You need to know settings for each of the groups in this solution, but there are ways around this depending on your data/solution:
Names Default To Here(1);
dt = Current Data Table();
biv = Bivariate(Y(:weight), X(:height), Group By(:occupation));
rbiv = biv << report << Show Points(1);
aa_line = Associative Array();
aa_line["Dentist"] = {"Yellow", "Dotted"};
aa_line["Doctor"] = {"Green", "DashDotDot"};
aa_line["Engineer"] = {"Red", "Solid"};
For Each({{key_occ, value_list}}, aa_line,
Eval(Eval Expr(biv << Fit Where(:occupation == Expr(key_occ), Fit Line({Line Color(Expr(value_list[1])), Line Style(Expr(value_list[2]))}))))
);
rbiv = biv << report << Show Points(1);
ymin = rbiv[Axis Box(1)] << Get Min;
ymax = rbiv[Axis Box(1)] << Get Max;
xmin = rbiv[Axis Box(2)] << Get Min;
xmax = rbiv[Axis Box(2)] << Get Max;
rbiv[Frame Box(1)] << {Frame Size(205, 164), Marker Size(2), Line Width Scale(2)};
rbiv[Border Box(2)] << Sides(0);
rbiv[Axis Box(1)] << Format("Best", 12) << Tick Font(style(1), size(9)) << Show Major Grid(1) << Show Minor Grid(1) << Show Minor Ticks(1);
rbiv[Axis Box(2)] << Format("Best", 12) << Tick Font(style(1), size(9)) << Show Major Grid(1) << Show Minor Grid(1) << Show Minor Ticks(1);
rbiv[Text Edit Box(1)] << Set Font Size(10) << Set Font Style("Bold");
rbiv[Text Edit Box(2)] << Set Font Size(10) << Set Font Style("Bold");
rbiv[Outline Box(2)] << Close All Below;
rbiv[Outline Box(2)] << Close All Like This;
-Jarmo