有条件地为数据表框着色我想根据条件为数据表框的特定单元格的文本着色。以我尝试执行的操作为例:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where(:Age > 14);
:Age << Color Cells( "Red" );
以上给出输出:

但窗口中的结果是:
win3 = New Window( "Combined Report",
Data Table Box(dt));

没有任何颜色。
总而言之,我想做的事情类似于模型输出窗口的 p 值发生的情况,当它们接近 0.05 的极限时,它们会被条件性地着色。
自动化和脚本数据访问数据探索与可视化回复:有条件地为数据表框的文本着色如果你使用<<获取报告你可以得到颜色
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Select Where(:Age > 14);
:Age << Color Cells("Red");
dt << clear select;
nw = New Window("",
dt << get as report
);

回复:有条件地为数据表框添加颜色文本带有单元格颜色的数据表可以移动到日志中
names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:name << color cells("red",{3,4,5,6,7});
dt:age << color cells("blue", {6, 8, 10});
nw = New Window("Output", <<JOURNAL></JOURNAL>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1728652930272.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_0-1728652930272.png" style="width: 332px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_0-1728652930272.png" style="width: 332px;"><span class="lia-inline-image-display-wrapper" image-alt="txnelson_0-1728652930272.png" style="width: 332px;"><img src="https://us.v-cdn.net/6038925/uploads/images/69035i30F4E03890B26090/txnelson_0-1728652930272.png" role="button" title="txnelson_0-1728652930272.png" alt="txnelson_0-1728652930272.png" /></span></SPAN></SPAN></SPAN></P>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_2-1728652973234.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_2-1728652973234.png" style="width: 153px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_2-1728652973234.png" style="width: 153px;"><span class="lia-inline-image-display-wrapper" image-alt="txnelson_2-1728652973234.png" style="width: 153px;"><img src="https://us.v-cdn.net/6038925/uploads/images/69037i96EE77964E3894C5/txnelson_2-1728652973234.png" role="button" title="txnelson_2-1728652973234.png" alt="txnelson_2-1728652973234.png" /></span></SPAN></SPAN></SPAN></P>
<P>使用替代方法,可以将数据表添加到非日记帐窗口,方法是将其通过日记帐,然后将其添加到标准显示窗口</P>
<P> </P>
<CODE class=" language-jsl">names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:name << color cells("red",{3,4,5,6,7});
dt:age << color cells("blue", {6, 8, 10});
nw = new window("Outline",ob=outlinebox("data table"));
ob<<APPEND></APPEND>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_3-1728653771020.png" style="width: 400px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_3-1728653771020.png" style="width: 116px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="txnelson_3-1728653771020.png" style="width: 116px;"><span class="lia-inline-image-display-wrapper" image-alt="txnelson_3-1728653771020.png" style="width: 116px;"><img src="https://us.v-cdn.net/6038925/uploads/images/69038iDDAC0EA4E28A359D/txnelson_3-1728653771020.png" role="button" title="txnelson_3-1728653771020.png" alt="txnelson_3-1728653771020.png" /></span></SPAN></SPAN></SPAN></P>
<P> </P>
<P> </P>回复:有条件地为数据表框的文本着色很好!但在我的例子中,表格很宽,并且有滚动条。

这会隐藏我不想要的最后一个列。是否可以将报告表的宽度调整到适合窗口?
回复:有条件地为数据表框的文本着色您可以修改创建的表框的滚动属性
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Probe.jmp");
dt << Select Where(:Site > 2);
:Site << Color Cells("Red");
dt << clear select;
nw = New Window("",
rep = dt << get as report
);
tb = rep << Child;
tb << Set Scrollable(0,0);