颜色单元你好,
如何使空单元格或带点单元格变灰?

我的是16.1版本。
谢谢
数据存取回复:颜色单元格如果变灰是指更改单元格颜色,最简单的选项很可能是基于脚本的。 一种选择是使用 << Get RowsWhere 获取要着色的行,然后使用 << Color Cells 设置这些行的颜色
Names Default To Here(1);
dt = Current Data Table();
For Each({colname}, dt << Get Column Names("String"),
rows_to_color = dt << Get Rows Where(Is Missing(Column(dt, colname)[]));
Column(dt, colname) << Color Cells("Gray", rows_to_color);
dt << Clear Select;
);

回复:颜色单元格如果您希望对每一列执行此操作,可以使用此脚本。
For Each( {col}, dt << Get Column Names( "String" ),
Eval(
Eval Expr(
dt << Select Where( Is Missing( As Column( Expr( col ) ) ) );
Expr( Column( col ) ) << Color Cells( "gray" );
dt << Clear Select;
)
)
);*编辑
Expr() 和所有这些都是完全不必要的。@jthi用他的例子指出了这一点。
For Each( {col}, dt << Get Column Names( "String" ),
dt << Select Where( Is Missing( As Column( col ) ) );
Column( col ) << Color Cells( "gray" );
dt << Clear Select;
);
回复:颜色单元格@mmarchandTSI您可能还想添加检查是否选择了某些行(<< Color Cells 否则将为所有单元格着色)。
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([., ., 1])),
New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([., ., .])),
New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([2, 3, 4]))
);
For Each({col}, dt << Get Column Names("String"),
dt << Select Where(Is Missing(As Column(col)));
Column(col) << Color Cells("gray");
dt << Clear Select;
);
/*
For Each({col}, dt << Get Column Names("String"),
dt << Select Where(Is Missing(As Column(col)));
If(N Items(dt << Get Selected Rows) > 0,
Column(col) << Color Cells("gray");
);
dt << Clear Select;
);
*/回复:颜色单元格应该没问题,因为 <
dt << Select Where( Is Missing( As Column( col ) ), current selection( "clear" ) )
回复:颜色单元格嗨,贾莫,
我可以在哪里添加这个选项?抱歉,我是 JMP 软件的新手。
回复:颜色单元格我的意思是,如果根本没有选择任何行,则该列中的所有单元格都将被着色。
在这种情况下,Age 中的所有单元格都会着色,因为没有选择任何行
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
wait(1);
:Age << Color Cells("Red");
wait(1);
dt << Select Rows([2,4,6,20]);
:Name << Color Cells("Blue");
dt << Clear Select;

回复:颜色单元格是的,好点。
回复:颜色单元格根据如何使用它,有几个选择。 最简单的选择是从“文件”菜单中打开新的脚本文件

然后将脚本复制粘贴到将打开的窗口

检查顶部“工具栏”中的表格是否正确(如果打开新脚本文件时该表格最后处于活动状态,则应该是正确的)。
然后按工具栏中的“运行脚本”

如果必须重复执行此操作,您可以将该脚本制作为工具栏项、加载项、表格脚本、脚本文件......具体取决于用途
回复:颜色单元格完美的! 感谢您的帮助。 对此,我真的非常感激。