將圖例更改為現有的 biv 圖你好,
我創建了一個帶有圖例“年齡”的 biv 圖表,現在我想使用具有不同圖例的相同圖表。
我該怎麼做?
這就是我嘗試的方法和我得到的錯誤。
prof=Bivariate(
Y( :high),
X( :weight),
by(:country),
SendToReport(
Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 550, 450 ),
Row Legend(
:age,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Alphanumeric" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 ))
} )
)
);
Report( prof )[Frame Box(1)] << Row Legend( “sex”, color(1), marker(1));
在訪問或評估“發送”、報告(教授)[框架框(1)]< “性別”,
顏色(1),
標記(1)
) /*###*/
在以下腳本中,錯誤標記為 /*###*/
報告(教授)[框架框(1)] << /*###*/行圖例(
“性別”,
顏色(1),
標記(1)
) /*###*/
{}
回复:將圖例更改為現有的 biv 圖當您將“按”添加到二元分析時,將返回對象列表。因此,您需要對列表中的每個項目進行操作。
Names default to here( 1);
dt = Open( "$Sample_data/big class.jmp" );
prof = Bivariate(
Y( :height ),
X( :weight ),
By( age ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
name,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
//Note how prof is a list
Show( type( prof ) );
Show( N Items( prof ) );
//Delete the old row legend first
Try( Report( prof[1] )[BorderBox(2)] << Delete );
//Add a new row legend
Report( prof[1] )[Frame Box(1)] << Row Legend(
sex,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
);