将图例更改为现有的 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));
发送期望脚本对象{731}在访问或评估“发送”、报告(教授)[框架框(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 )
);