如何标准从循环脚本生成的所有图形的轴刻度(日志)?我正在尝试编写一个循环遍历列的简单脚本,并迭代地将每列用作绘图中的Y值。我想我已经让for循环了,但是我无法将Y轴设置为对数刻度。代码运行但生成的每个图都是线性标度,其范围特定于每列。 我希望每个图表都在对数刻度上(具有特定设置的最小值/最大值或基于数据自动生成的范围)。
cd = Current Data Table();
column_names = cd << Get Column Names;
For ( i = 256, i <= 258, i++,
Graph Builder(
Size( 625, 660 ),
Variables(
X( :Day ),
Y( Column( cd, column_names[i] ) ),
Overlay( :Dose ),
),
Elements( Line( X, Y, Legend( 6 ) , Error Bars ("Standard Deviation") ) ),
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,
ScaleBox,
{Scale( "Log" ), Format( "Best", 12), Min( 0.002 ), Max( 16000 ),
Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Width( 2 )} ),
Properties( 1, {Line Width( 2 )} ),
Properties( 2, {Line Width( 2 )} ),
Properties( 3, {Line Width( 2 )} ),
Properties( 4, {Line Width( 2 )} )
)}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( Column(cd, column_names[i]))}
)
)
))
我读过了 https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/mp/54573#M30852 我仍然被困住了。我试过包括ScaleBox(1)或ScaleBox(2)但是甚至无法将第一个或第二个图形放在对数刻度上。我也在尝试xPath解决方案,但额外的帮助会很棒。
非常感谢!!
奖金问题:
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,什么是“数据库”。Counts T CD56br“参考这里?这是我的一个列名(但不是所有的列名!),它被复制/粘贴并保存。 它似乎正在以它应该的方式运行(除了规模之外的东西)并将其改为其他值(即“数据”)似乎没有破坏任何东西。这是什么?
Re:如何标准从循环脚本生成的所有图形的轴刻度(log)?实际上,事实证明我的问题确实是奖励问题。我不得不将该名称更改为char(column_names [i]),以便以下规范适用于* that * graph。
所以有效的代码是:
cd = Current Data Table();
column_names = cd << Get Column Names;
For ( i = 255, i <= 256, i++,
gb = Graph Builder(
Size( 625, 660 ),
Variables(
X( :Day ),
Y( Column( cd, column_names[i] ) ),
Overlay( :Patient ),
Color( :Dose )
),
Elements( Line( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
Char(column_names[i]),
ScaleBox,
{Scale( "Log" ), Format( "Best", 12 ), Min( 0.002 ), Max( 16000 ),
Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Width( 2 )} ),
Properties( 1, {Line Width( 2 )} ),
Properties( 2, {Line Width( 2 )} ),
Properties( 3, {Line Width( 2 )} ),
Properties( 4, {Line Width( 2 )} )
)}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( Column(cd, column_names[i]) )}
)
)
);
rgb = gb << report;
rgb << journal;
);