回复:根据可用的Y变量生成变异性图表并将其保存到PNG图片中我修改了您的代码。 我没有测试您的代码,但我相信它会工作。 我没有测试。
dt = Open( "D:\My Drive\Program.jmp" );
// Find the Y Columns
numericColNamesList = dt << get column names( string, numeric );
For( i = N Items( numericColNamesList ), i >= 1, i--,
If( Not( Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 & Word( 2, numericColNamesList[i], ":" ) != "" ),
numericColNamesList = Remove( numericColNamesList, i, 1 )
)
);
// With varying Y columns and fixed X columns
For( i = 2, i <= N Items( numericColNamesList ), i++,
obj = dt << Variability Chart(
Y( ::Column( numericColNamesList[i] ) ),
X( :code, :lot, :Label, :wafer ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for numericColNamesList[i]"},
"Variability Chart",
FrameBox,
{Marker Size( 6 ), Row Legend(
Label,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
fName = Report( obj )[Outline Box( 1 )] << Get Title;
Report( obj )[Outline Box( 1 )] << Save Picture( "$TEMP/myPics/" || fName || ".png", "PNG", append );
);
回复:根据可用的Y变量生成变异性图表并将其保存到PNG图片中非常感谢Jim。
我尝试了代码,但是现在我出现了Var图表的多个窗口,但是没有一个窗口被保存为指定驱动器中的PNG。 我想也许我错过了“保存图片”部分附近的内容。
回复:根据可用的Y变量生成变异性图表并将其保存到PNG图片中你好
我找到了原因。该脚本现在可以运行。
但是,对于名称中带有“ /”的变量(例如A_B / Tox / Cap),脚本将提示错误并且无法继续。
Report(obj)<<保存图片(“ $ TEMP / myPics /” || colList [i] ||“ .png”,PNG);
是由于colList [i]吗?
根据可用的Y变量生成变异图并将其保存到PNG图片中你好
我正在尝试编写一些脚本脚本,这将帮助我根据可用的列名自动生成一些可变性图表,并将其另存为个人 PNG图片,以便可以将图片链接到我的Powerpoint。
但是我不确定为什么在调试期间始终未定义“ obj”。
想就此寻求一些建议。非常感谢。
-安
dt = Open( "D:\My Drive\Program.jmp" );
// Find the Y Columns
numericColNamesList = dt << get column names( string, numeric );
For( i = N Items( numericColNamesList ), i >= 1, i--,
If(
Not(
Is Missing( Num( Word( 1, numericColNamesList[i], ":" ) ) ) == 0 &
Word( 2, numericColNamesList[i], ":" ) != ""
),
numericColNamesList = Remove( numericColNamesList, i, 1 )
)
);
// With varying Y columns and fixed X columns
For( i = 2, i <= N Items( numericColNamesList ), i++,
obj = dt << Variability Chart(
Y( ::Column( numericColNamesList[i] ) ),
X( :code, :lot, :Label, :wafer ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Automatic Recalc( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for numericColNamesList[i]"},
"Variability Chart",
FrameBox,
{Marker Size( 6 ), Row Legend(
Label,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
);
obj = List( obj[i] );
For( i = 1, i <= N Items( obj ), i++,
fName = Report( obj )[Outline Box( 1 )] << Get Title;
Report( obj )[Outline Box( 1 )] << Save Picture( "$TEMP/myPics/" || fName || ".png", "PNG" );
Report( obj )[Outline Box( 1 )] << Save Picture( "$TEMP/myPics/" || fName || ".png", "PNG", append );
);
脚本编写