名稱未解決:Framebox 和其他屬性大家好,
我嘗試創建一個函數,但它不斷出現框架框、軸框和輪廓框錯誤。我不太明白該功能有什麼問題。請幫忙並解釋一下
名稱未解析:存取或評估 'Framebox' 時的 Framebox,Framebox( 1 ) /*###*/
bivplot = Function( {x_param, y_param, int1, int2 },
biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"name1", "age1"};
colname = {"name2", "age2"};
int1 = {1.5, 2};
int2 ={-1.5, -2};
lapbiv = Fit Group (
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
);
<<{Arrange in Rows( 4 )}
SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))
);資料存取Re: Name Unresolved: Framebox 和其他屬性我懂了。 謝謝你的清楚解釋
Re: Name Unresolved: Framebox 和其他屬性當您在 Bivariate 中有一個 By() 元素時,將為每個 By 變量級別創建一個單獨的顯示樹。需要指定對 By 變量中特定級別以下對象的引用。
rbiv = report( biv[2] );
下面是一個簡單的例子,刪除了按變量性別的第二級的整個報告
Names Default To Here( 1 );
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "/C:/Program Files/SAS/JMPPRO/15/Samples/Data/Big Class.jmp" );
biv = bivariate( x( :height ), y( :weight ), by( :sex ) );
Show( biv );
Report( biv[2] )[Outline Box( 1 )] << delete;
Re: Name Unresolved: Framebox 和其他屬性現在效果很好,謝謝。
但是我還有一個問題,為什麼我嘗試添加Group By(:Sex)時提示錯誤
名稱未解析:Framebox 在訪問或評估“Framebox”時出現,Framebox( 1 ) /*###*/Exception in platform launch in access or evaluation of 'Fit Group'
bivplot = Function( {x_param, y_param, int1, int2},
biv = Bivariate(
X( Column( x_param ) ),
Y( Column( y_param ) ),
Group By (:Sex),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
);
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend(
Column( "Sex" ),
Color( 1 ),
Marker( 0 ),
Color Theme( "JMP Default" ),
Continuous Scale( 0 )
);
rbiv[Outline Box( 3 )] << Close All Below;
);
Re: Name Unresolved: Framebox 和其他屬性以下是您的腳本的工作版本
bivplot = Function( {x_param, y_param, int1, int2},
biv = Bivariate(
X( Column( x_param ) ),
Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} )
);
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) <<
Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend(
Column( "Sex" ),
Color( 1 ),
Marker( 0 ),
Color Theme( "JMP Default" ),
Continuous Scale( 0 )
);
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 = {-1.5, -2};
lapbiv = Fit Group(
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
)
);
lapbiv << Arrange in Rows( 4 );
Report( lapbiv )[Outline Box( 1 )] << Set Title( "Correlation Plot (All)" );Re: Name Unresolved: Framebox 和其他屬性嗨 txnelson,謝謝。 如果 <<[Arrange in rows(4)} 和 SendToReport 在語法上不正確,我可以知道如何將圖排列成 4 行嗎?
Re: Name Unresolved: Framebox 和其他屬性有幾個問題。
- “雙變量”平台需要 2 個數字列。您正在指定一個 Name 列,我假設它是一個字符列。
- <<[Arrange in rows(4)} 和 SendToReport 在語法上不正確,無法在平台完成後傳遞給顯示。
以下代碼適用於 Big Class 數據表
bivplot = Function( {x_param, y_param, int1, int2 },
biv = Bivariate( X( Column( x_param ) ), Y( Column( y_param ) ),
Fit Line( {Confid Curves Indiv( 0 ), Line Color( "Black" )} ),
Fit Special( Intercept( int1 ), Slope( 1 ), {Line Color( "Purple" )} ),
Fit Special( Intercept( int2 ), Slope( 1 ), {Line Color( "Purple" )} ));
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[axisbox( 2 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[axisbox( 1 )] << Tick Font( style( 1 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) << Show Minor Ticks( 1 );
rbiv[Framebox( 1 )] << Row Legend( Column( "Sex" ), Color( 1 ), Marker( 0 ), Color Theme( "JMP Default" ), Continuous Scale( 0 ) );
rbiv[Outline Box( 3 )] << Close All Below;
);
colnamex = {"height", "weight"};
colname = {"weight", "height"};
int1 = {1.5, 2};
int2 ={-1.5, -2};
lapbiv = Fit Group (
For( i = 1, i <= N Items( colname ), i++,
bivplot( colname[i], colnamex[i], int1[i], int2[i] )
);
//<<{Arrange in Rows( 4 )}
//SendToReport(Dispatch({},"Fit Group", OutlineBox,{Set Title( "Correlation Plot (All)")}))
);