I was told a draft of my reply should be available, but it was not. So this note will add some details lost with the original post.
Your script is fitting a common slope model (analysis of covariance). Typically, that should always be accompanied with a test for interaction (the slopes vary by tool). The model also uses :Date as the continuous factor which is typical of a time series or control chart model.
The reason for these questions is that the line color task is much easier in other platforms, for example, Bivariate where Tool would be a grouping factor. If you clarify the goal of your model, the bloggers can assess if there might be a better platform to use. Most often there are multiple methods to achieve a task in JMP.
As stated the script (attached) does perform the task you requested. The script uses Big Class where :weight replaces :Value, :height replaces :Date and :sex replaces :Tool. The Fit model statement was slightly modified so that the Fit Model Dialog is closed after it runs. Some script notes:
- The first model fit uses only M (males) to emulate your only "b" scenario. It uses a method to find named graph segments using Xpath then sends messages to modify the colors.
- Note: the named segment for the confidence band changed in JMP 14, in JMP 12 & 13, it is called ".05 Significance Curve" and in JMP 14 is is called "0.05 Significance Curve"; there is a comment in the script above the line that needs changing.
- The second model fits both F and M (simulating your 2 tool scenario). This is an example of an alternate method using numbered segments and Dispatch statements.
Another item to note is that JMP 13 and 14 have shaded Confidence bands. I found an issue (that I reported to JMP): changing the shading for one factor changes it for all Fit Model confidence bands in that JMP session, so I chose light gray, a neutral, due to this issue.... so you would not see red bands with blue lines or vice versa. JMP 12 has no shading so there is no issue.
Not knowing your comfort level with JSL, the second method might be easier to manage. Create an onlyAExpr, an onlyBExpr and a bothExpr using the second method as a template. For each, specify the preferred coloring.
Given your second post, I am attaching a script of alternate displays you might want to investigate, depending upon your goals for the analysis.