样条拟合线图例大家好,
我正在尝试使用拟合样条线创建双变量图。 但是,我正在尝试获取线路图例,但没有成功。 如何获取并保存线路图例? 请帮忙
这是我的功能
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" ) );
回复:样条拟合线图例我不太清楚你的意思是'获取线路图例'。 请使用下面的示例,更具体地说明您想从报告中获取哪些信息?
