Hello JMP users, I am new here so please be gentle.
I am working on a script to make a bivariate plot of two variables (Var 1, Var 2) which is then colored by a third variable (Result). This is pretty simple, but my problem now is that the engineer would like an identifier of the fourth variable (Description) on the plot. So I need to take each unique Description, map it to a integer (there could be any number of decriptions), and then overlay that integer on the corresponding point. If they want to know what integer corresponds to which description they can mouse over the point (I have Description "Labelled").
I have attached an image of what I am going for. For some reason I'm having trouble uploading the image directly into the post.
New Table( "table",
Add Rows( 40 ),
New Column( "Var 1",
Numeric,
Ordinal,
Format( "Best", 8 ),
Set Values(
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]
)
),
New Column( "Var 2",
Numeric,
Ordinal,
Format( "Best", 8 ),
Set Selected,
Set Values(
[0.35, 0.375, 0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.35,
0.375, 0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.35, 0.375,
0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.35, 0.375, 0.4,
0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575]
)
),
New Column( "Result",
Character,
Nominal,
Set Values(
{"PASS", "PASS", "PASS", "FAIL", "FAIL", "FAIL", "FAIL", "FAIL", "FAIL",
"FAIL", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"FAIL", "FAIL", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "PASS", "FAIL", "PASS", "PASS", "PASS", "PASS", "PASS", "PASS",
"PASS", "FAIL", "FAIL", "FAIL"}
)
),
New Column( "Description",
Character,
Nominal,
Set Values(
{"", "", "", "A", "A", "A", "A", "B", "B", "C", "", "", "", "", "", "",
"", "", "B", "C", "", "", "", "", "", "", "", "", "", "C", "", "", "",
"", "", "", "", "B", "B", "C"}
)
)
);
Graph Builder(
Size( 499, 513 ),
Show Control Panel( 0 ),
Automatic Recalc( 0 ),
Variables( X( :Var 1 ), Y( :Var 2 ), Color( :Result ) ),
Elements( Points( X, Y, Legend( 4 ), Jitter( 1 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 4, Properties( 0, {Marker( "FilledSquare" )} ) )}
),
Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 9 )} )
)
);