2111_en-US
invalid matrix tokenCan someone tell me what the error "invalid matrix token" means? I am using the following script in a for loop (j as iterator) in order to graph and add a box for limits. However, the script is giving me the matrix error. Can someone give me a hint?
dgb=Bivariate(
Y(Column(yPlot)),
X(Column(xPlot)),
SendToReport(
Dispatch({}, "1", ScaleBox, {Max(xmax), Min(xmin)}),
Dispatch({}, "2", ScaleBox, {Max(ymax), Min(ymin)}),
Dispatch({},"Bivar Plot",FrameBox,
Add Graphics Script(
2,
Description("Script"),
Transparency(0.5);
FillColor({0.38, 0.84, 0.67});
Polygon([xLL,xLL,xUL,xUL], [yLL,yLL,yUL,yUL]);
)
)
)
);
xLL,xLL,xUL,xUL,yLL,yLL,yUL,and yULare matrices of numbers. It also seems that this will not put the numbers in the script to the graph. Does anyone know how to do this?
Message was edited by: h.lazar
Message was edited by: h.lazarRe: invalid matrix tokenSo I figured out I had to use substitute but this still does not place the numbers in the script for the plot. Anyone have any ideas?
db=Bivariate(
Y(Column(yPlot)),
X(Column(xPlot)),
//invisible,
SendToReport(
Dispatch({}, "1", ScaleBox, {Max(xmax), Min(xmin)}),
Dispatch({}, "2", ScaleBox, {Max(ymax), Min(ymin)}),
Dispatch({},"Bivar Plot",FrameBox,
Add Graphics Script(2,
Description("Targets and Limits"),
PenColor("black");
PenSize(2);
Eval(Substitute(Expr(Line({xt1,y11},{xt1,y22})),
expr(xt1),xT,expr(y11),yLL,expr(y22),yUL));
Eval(Substitute(Expr(Line({x11,yt1},{x22,yt1})),
expr(x11),xLL,expr(yt1),yT,expr(x22),xUL));
Transparency(0.15);
FillColor(66);
Eval(Substitute(Expr(Polygon(
matrix({x11, x11, x22, x22}),matrix({y11, y22, y22, y11}))),
expr(x11),xLL,
expr(x22),xUL
expr(y11),yLL,
expr(y22),yUL))
);
);
);
);
);Re: invalid matrix tokendoes anyone have an answer to this? how do you script and "add graphics script" to a platform graph and insert values for variables?
thanks
HeatherRe: invalid matrix tokenI've tried loading this script to try it out for myself, but there are a couple of errors in it (there's a comma missing at the end of the "expr(x22)" line plus one mismatched bracket at the end). Correcting these as I'm assuming they should be corrected gives the program below, which I've tried running on one of the supplied data sets as shown: it crashes because it doesn't know what "xT" is. I can see another reason it might not work, namely that xmax, xmin, ymax and ymin aren't defined in this data set, but since I don't have your data I don't know what values these should take: