图例未显示已保存的PNGdt = Open( "\\someFile.jmp", invisible);
path = "\\path\to\folder\";
names = { "Amplitude 1/2 Vppse", "Amplitude Vppde"};
ngraphs = N Items( names );
For( ip = 1, ip <= ngraphs, ip++,
current_graph = dt << Variability Chart(
invisible,
Y( Column(dt, names[ip])),
X( :Temp, :vccl),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for " || names[ip]},
"2",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
),
Dispatch(
{"Variability Chart for " || names[ip]},
"Variability Chart",
FrameBox,
{Row Legend(
Serial,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Standard" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
current_graph rep = current_graph << Report;
chart_type = Char(current_graph << Title);
chart_type = Munger(chart_type, 1, "[]", "");
If(chart_type == "Variability Chart", name = current_graph rep[TextEditBox(1)] << Get Text );
name = Munger(name,1,"/", "_");
final_name = chart_type || "_" || name ;
picture_path = path || Char(final_name) || ".png";
current_graph << Save Picture( picture_path, "png" );
)
救命!因此,我设法制作了一个for循环,以便为放入数组中的每一列创建一个图形。这实际上有效:)
但是,即使我在脚本中也没有显示图例。
我还注意到,在一个仅包含数据且没有运行脚本的空白jmp文件中,我的数据点只是黑点,而不是我在脚本中指定的彩色标记。这个连接了吗?我是否必须在数据集中运行一个脚本,然后像上面的脚本一样运行整个.jsl脚本?为什么我的图例不显示我在脚本中指定的方式。
回复:图例不显示已保存的PNG一个类似的脚本对我有用的示例数据。 您是要通过“序列”列还是通过测量列进行着色?
回复:图例不显示已保存的PNG通过序列。我有多个部分,对它们进行了一些测试。我想用脚本中显示的颜色和标记查看序列号。我会在原始帖子中添加图片以显示结果回复:图例不显示已保存的PNG好的,似乎在循环中执行此操作时出现的问题是Dispatch()语句无法采用类似表达式(“ ||名称[ip]的可变性图表”)。 我认为您最好不要使用SendToReport,而应添加:
current_graph rep[Frame Box(1)] << Row Legend(...)
回复:图例不显示已保存的PNG当我在SendToReport内部有两个Dispatch时,该怎么做?还是像下面的代码那样两次?
current_graph rep[Frame Box(1)] <<
Dispatch(
{"Variability Chart for " || names[ip]},
"2",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
),<BR />current_graph rep[Frame Box(1)] <<
Dispatch(
{"Variability Chart for " || names[ip]},
"Variability Chart",
FrameBox,
{Row Legend(
Serial,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Standard" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
);回复:图例不显示已保存的PNG我应该说您可以同时避免SendToReport和Dispatch。 每个Dispatch命令本质上都标识一个显示框并向其发送消息。 平台启动后,您的两个命令将变为:
</CODE></PRE>
<P> </P>
<P> </P>
<P> </P></LINGO-BODY><LINGO-SUB id="lingo-sub-232818" slang="en-US">回复:图例不显示已保存的PNG</LINGO-SUB><LINGO-BODY id="lingo-body-232818" slang="en-US"><P>谢谢!起初它不起作用,但我补充说 </P><PRE><CODE class=" language-jsl">current_graph rep = current_graph << Report;<BR />current_graph rep[Scale Box(2)] << Label Row(...);<BR />current_graph rep<SPAN class="token punctuation">[</SPAN>Frame Box<SPAN class="token punctuation">(</SPAN><SPAN class="token number">1</SPAN><SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">]</SPAN> <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN> Row Legend(...);
在“框盒”和“比例盒”之前,它似乎可以解决问题。谢谢!!!!!!!!