꽤 특별한 주식 차트네요. 전문가 여러분, 감사합니다.
하위 집합을 추출하지 않고도 전체 대형 테이블을 사용하여 제어판에서 독립적인 그래프를 만드는 방법은 무엇입니까?
예를 들어, 이 주식 데이터는 스크립트로 처리되어 여러 주식 데이터를 생성하고, 각 주식의 가격 데이터는 크게 다릅니다.
Graph Builder의 wrap을 이용해 완벽한 그래프를 얻는 것은 어렵습니다.
d0=Current Data Table();r=N Row(d0);
VV={"Date","Open","High","Low","Close","Volume"};
for(k=1,k<=4,k++,
d0<<SELECT where="">2,For(j=2,j<=NItems(VV)-1,j++,i=1;ca=VV[j];ar=d1< How to use scripts to create independent graphs for each stock in the control panel?Automation and Scripting</SELECT>
dt=Current Data Table();p1=dt<< Graph Builder(Size(656,518),Show Control Panel(0),Show Legend(0),Show Title(0),Show Footer(0),Show X Axis(0),Show Y Axis(0),Show X Axis Title(0),Show Y Axis Title(0),Variables(X(Transform Column("Row",Formula(Row()))),Y(:High),Y(:Low,Position(1)),Y(:M5,Position(1),Side("Right")),Y(:M10,Position(1),Side("Right")),Y(:Volume)),Relative Sizes("Y",[243 166]),Elements(Position(1,1),Bar(X,Y(1),Y(2),Legend(7),Bar Style("Interval")),Line(X,Y(3),Y(4),Legend(6))),Elements(Position(1,2),Bar(X,Y,Legend(5))),SendToReport(Dispatch({},"Row",ScaleBox,{Min(-1),Max(64),Inc(10),Minor Ticks(0)}),Dispatch({},"High",ScaleBox,{Min(20),Max(56),Inc(10),Minor Ticks(1)}),Dispatch({},"M5",ScaleBox,{Min(20),Max(56),Inc(10),Minor Ticks(1)}),Dispatch({},"400",ScaleBox,{Legend Model(5,Properties(0,{Fill Color(32),Transparency(0.5)},Item ID("Volume",1)))}),Dispatch({},"Graph Builder",FrameBox,{Add Graphics Script(4,Description(""),/*KE*/bb=0.4;days=r-1;Pen Size(1);For(i=1,i<=N Rows(dt),i++,If(:Open[i]<=:Close[i],Pen Color(light red);Fill Color(light red);,Pen Color(light green);Fill Color(light green););Rect(i-bb,Max(:Open[i],:Close[i]),i+bb,Min(:Open[i],:Close[i]),1);Rect(i-bb,Max(:Open[i],:Close[i]),i+bb,Min(:Open[i],:Close[i]),0););)}),Dispatch({},"400",LegendBox,{Legend Position({7,[3],6,[0,1],5,[2]})})));(p1 << XPath("//OutlineBox[text() = 'Graph Builder']")) << Set Title("");

그래프 빌더 호출에서 Where를 사용하여 그림으로 얻을 수 있습니다.
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
Summarize(dt, groups = By(:sex));
lub = Lineup Box(N Col(2));
For Each({group}, groups,
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
Where(:sex == group),
Invisible
);
wait(0);
lub << Append(Report(gb) << get picture);
gb << Close Window;
);
nw = New Window("Report",
lub
);
Write();
주식 차트에는 스크립트가 있기 때문에 효과가 다릅니다. 전문가 여러분, 감사합니다!
/*KE*/bb=0.4;days=r-1;Pen Size(1);For(i=1,i<=N Rows(dt),i++,If(:Open[i]<=:Close[i],Pen Color(light red);Fill Color(light red);,Pen Color(light green);Fill Color(light green););Rect(i-bb,Max(:Open[i],:Close[i]),i+bb,Min(:Open[i],:Close[i]),1);Rect(i-bb,Max(:Open[i],:Close[i]),i+bb,Min(:Open[i],:Close[i]),0););
그림 부분은 건너뛰고 Where?만 사용하세요.
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
Summarize(dt, groups = By(:sex));
lub = Lineup Box(N Col(2));
gbs = {};
For Each({group}, groups,
gb_expr = Expr(dt << Graph Builder(
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
Where(:sex == group),
Invisible
));
lub << Append(gb = gb_expr);
Insert Into(gbs, gb);
);
nw = New Window("Report",
lub
);
Show(gbs << Get Data Table);
Write();