樣條擬合線圖例大家好,
我正在嘗試使用擬合樣條線創建雙變量圖。 但是,我正在嘗試獲取線路圖例,但沒有成功。 如何取得並保存線路圖例? 請幫忙
這是我的功能
bivplot_mrw = Function({ ycol }, {plot},
biv = Bivariate( Y( Column(dt, ycol) ), X( Column( dt, mrwname ) ), Group By( Column( dt, grpname2 ) ),
Fit Spline( 1000 ) );
rbiv = biv << report << Show Points( 0 );
ylist = {};
For(g2 = 1, g2 <= Nitems(grplist2[1]), g2++,
Try(
curvename = rbiv[Outline Box( g2 + 1 )] << Get Title;
//Compute max and min per spline fit line to get y-axis max and min
current_row = storows2[ Contains( stolist2, grplist2[3][g2] ) ]; //Get the stolist rows for grplist2[g2]
current_row << Intersect( grprows[ Contains( grplist, grplist2[2][g2] ) ]);
current_row = Matrix( current_row << Get Keys );
xin = Column( dt, mrwname)[current_row];
yin = Column( dt, ycol)[current_row];
Try(ypred = Spline Eval( xin, Spline Coef( xin, yin, 1000 ) ));
ylist = Concat(ylist, As List(ypred));
//Adjust also the line style
If(
Contains( curvename, linestyle["ddd"] ),
biv << (Curve[g2] << Line Style( DashDotDot )),
Contains( curvename, linestyle["dash"] ),
biv << (Curve[g2] << Line Style( Dashed ))
);
));
Try( paxis = axiscalc( Min(ylist), Max(ylist) ), Show("axiscalc error for "||ycol) );
Try( xaxis = axiscalc( mrwmin, mrwmax ), Show("axiscalc error for MRW") );
rbiv[Frame Box( 1 )] << {Frame Size( 205, 164 ), Marker Size( 1 ), Line Width Scale( 2 )};
Try( rbiv[Axis Box( 1 )] << Max( paxis["Max"] ) << Min( paxis["Min"] ) << Inc( paxis["Inc"] ) << Minor Ticks( paxis["Ntick"] ) );
Try( rbiv[Axis Box( 2 )] << Max( xaxis["Max"] ) << Min( xaxis["Min"] ) << Inc( xaxis["Inc"] ) << Minor Ticks( xaxis["Ntick"] ) );
rbiv[Axis Box( 1 )] << Format( "Best", 12 ) << Tick Font( style( 1 ), size( 9 ) )
<< Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Axis Box( 2 )] << Format( "Best", 12 ) << Tick Font( style( 1 ), size( 9 ) )
<< Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Text Edit Box( 1 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rbiv[Text Edit Box( 2 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
(rbiv << xpath( "//OutlineBox" )) << Close;
rbiv[Outline Box( 1 )] << Set Title( ycol );
rbiv[Border Box( 2 )] << Delete Box;
rbiv[Outline Box( 1 )] << Open All Like This;
);
進階統計建模回覆:樣條擬合線圖例這樣有幫助嗎?
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt << Bivariate(
Y( :weight ),
X( :height ),
Show Points( 0 ),
Fit Where( :sex == "F", Fit Spline( 1000, {Line Color( {212, 73, 88} )} ) ),
Fit Where( :sex == "M", Fit Spline( 1000, {Line Color( {66, 112, 221} )} ) ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Grid Line Order( 1 ), Reference Line Order( 2 )}
)
)
);
bivRep = Report(biv);
pb2Pic = bivRep[PictureBox(2)] << getPicture(Scale(1.5));
nw = New Window("Example", pb2Pic);回覆:樣條擬合線圖例你好馬克貝利,我只需要將線條圖例儲存為圖像,以便我可以在我的 powerpoint 中的幾張投影片上使用它。
回覆:樣條擬合線圖例你好伊恩_jmp ,我想將線條圖例儲存/獲取為圖像,以便我可以在我的 powerpoint 中的其他幻燈片上使用它
回覆:樣條擬合線圖例喜歡@ian_jmp ,我也不確定您在問什麼,但這裡有一個簡單的範例來說明訪問每個適合的紅色小三角選單中的命令的語法:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate(
Y( :weight ),
X( :height ),
Fit Spline( 10 )
);
biv << (Curve[1] << Line Color( "Green" ) );
回覆:樣條擬合線圖例我不太清楚你的意思是'取得線路圖例'。 請使用下面的範例,更具體地說明您想從報告中獲取哪些資訊?
