Hello,
Attached is a table1.jmp with 3 columns that I will use to plot a chart. Table2 is a table with Reference Lines information. Also attached is the output_chart.png that I am trying to accomplish. Is it possible to write a jsl to plot a chart and input the reference lines information that are different for different product. I also won't mind any other way to plot the chart. Any help is greatly appreciated!
If you are using JMP18, this is other option you could try
Names Default To Here(1);
dt1 = Open("$DOWNLOADS/table1.jmp");
dt2 = Open("$DOWNLOADS/table2.jmp");
gb = dt1 << Graph Builder(
Size(1162, 468),
Show Control Panel(0),
Link Page Axes("Y Only"),
// Replicate Linked Page Axes(0), // would show Y-axis only once
Variables(X(:Date), Y(:Yield), Page(:Product, Levels per Row(3), Show Title(0))),
Elements(Points(X, Y, Legend(4)), Smoother(X, Y, Legend(5)))
);
// get PM list
Summarize(dt1, pms = By(:Product));
// Each X-Group will have its own framebox
// NOTE We assume that PM order is the default one
all_axis = Report(gb) << XPath("//AxisBox");
abs = all_axis[1::N Items(all_axis)::2];
For Each({cur_pm, idx}, pms,
cur_ab = abs[idx];
// Loop over line specifications and set lines
pm_spec_rows = dt2 << get rows where(:Product == cur_pm);
For Each({spec_row}, pm_spec_rows,
val = dt2[spec_row, "Design Change Dates"];
name = dt2[spec_row, "Design Name"];
cur_ab << Add Ref Line(val, "Solid", "Red", name, 1);
);
);
It utilizes new "grid" style when using Page. This allows us to have separate X-axis for each of the groups

You can also show the Y-axis only once if you change Replicate Linked Page Axes setting

Not being a scripter, I tried something different. In the attached I created a column for "new product" in Table 2, and then joined the tables using Product as the key. The stored graph from Graph Builder colored the points by the Design Name, used Product in the Group X field, and selected both Date and Design Change Dates as X variables with Yield as Y. I modified the marker size. I think more could be done to improve the display (at least move PM3 to the right since it had no design changes).