Is there a specific reason to using Bivariate (Fit Y by X) instead of Graph Builder? In graph builder you could use Color:

and to get correct "by" column you could combine lot id and sub lot id columns into one with concatenate and use Wrap or Page

I am guessing a bit, but it seems that what you did, was to run your script on your data table


And then specified
Color or Mark by Column
and selected Final SB as the column to color by

Which gave you

The Legend clearly isn't getting changed as it should. To work around this issue, just run your script after you have done the
Color or Mark by Column
and you will get

Hi Jim,
Thanks for your kind answer.
The sequence of my script is: Change color from dataset according to SBin -> build wafer map.
As I'm putting a color before running a script to build a wafer, I'm quite lost where to debug.
Best regards,
K
Hi all,
I'm trying to make script which shows row legend with Bin# for the wafer map.
My dataset has LotID, wfID, X, Y, bin info and trying to bring colors based on what we have on original dataset.
Datasets are colored accordingly, but my row legend for wafer map doesn't.

Bivariate(
Y(:Die Y),
X(:Die X),
By(:Lot id, :Sub Lot id),
Title("Lot " || Char(:Lot id) || " Wafer " || Char(:Sub Lot id)),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Frame Size(250, 228), Row Legend(
Final SB,
Color(0),
Marker(0),
Marker Theme(""),
Continuous Scale(0),
Reverse Scale(0),
Excluded Rows(0)
)}
)
)
);
Can someone help me out to match row legend colors with what we have in the wafer map?
Thanks in advance.
Best regards,
K