选择问题我创建了一个图表,当我选择其中的一部分时,它会突出显示整个 Excel 工作表。 我记得在演示中您应该能够选择一个段并让它仅突出显示与该段直接相关的数据。 我在这里做错了什么?
我还想知道是否有什么方法可以让JMP找到同一条线上多个点的峰值数据并将其显示在图表中?
感谢您的时间
回复:选择问题尝试稍微不同的策略,我去掉了脚本中调整点的大小和外观的部分,只是暂时更改了我的首选项中的这些设置,我意识到我之前的脚本实际上并没有将指向其他图表(比第一个图表更多),所以我想出了这个。 然而,它正在做一些相当奇怪的事情,它完全独立地以平滑的方式绘制出第一行的第二个图表......
dt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
elements_txt = elements_txt ||
"Legend( 7 ) ),
Points( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
elements_txt = elements_txt ||
"Legend(8))
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[14]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[15]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);
我为此保存了脚本,然后保存了我希望它看起来如何的脚本(只是顶部图表),但我不确定需要编辑哪些部分来摆脱错误的图表......
//This is what it graphs
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Name( "Time[sec]" ) ),
Y( :Name( "CH2-Chemical Cal" ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH2-Chemical Cal" ) )
),
Elements(
Position( 1, 1 ),
Line( X, Y( 1 ), Y( 2 ), Legend( 7 ) ),
Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
),
Elements(
Position( 1, 2 ),
Points( X, Y, Legend( 11 ) ),
Smoother( X, Y, Legend( 12 ) )
),
SendToReport(
Dispatch(
{},
"CH2-Chemical Cal",
ScaleBox( 2 ),
{Min( -125.45871559633 ), Max( 1724.54128440367 ), Inc( 100 ),
Minor Ticks( 1 )}
)
)
);
// This is what I want it to graph
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Name( "Time[sec]" ) ),
Y( :Name( "CH2-Chemical Cal" ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) )
),
Elements(
Line( X, Y( 1 ), Y( 2 ), Legend( 7 ) ),
Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
)
);回复:选择问题公平地说,我并不是真的在寻找某人投入大量工作,如果涉及到这一点,我必须将其称为委员会,只是希望有人可以对我可以尝试或指出的内容提出一些建议我的方向是正确的,我在深渊里有几个漂浮物,他们正在失去空气 XD
回复:选择问题很抱歉,但我没有时间投入时间进行调试,然后将新代码实现到与您的脚本一样大的代码中。 我祝您好运,在社区中找到可以帮助您的人。回复:选择问题听起来棒极了,所以这就是问题所在,我不知道该怎么做 XD。 脚本比我先进得多,只是试图将其加工成一种形状来完成我需要它做的事情,它按原样工作(我的意思是我可以让它工作,而不是它做我需要它做的事情)但是可以说,我想要一些合身和抛光的东西。 我正在尽我所能地挖掘文献并试图解决它,但我真的还不知道行话。 因此,目前通道数是由弹出框(在下标中)选择的,知道有没有办法告诉图例我选择了多少行以便仅修改该行数? 据推测,这就是脚本其余部分中的变量函数正在执行的操作,因为它对于多行/通道等没有问题...... 我尝试添加此部分的唯一原因是因为使用折线图时,您无法选择一个段来跟踪相关数据。 我需要能够找到一条线的峰值。 我还希望 JMP 也将这些数据放入图表中,但我认为这会比这更困难,因为我要求脚本不仅选择数据中不同的特定点,而且还选择一行中可能不止一个,我需要一个特定的,而不仅仅是第一个或最高的一个。 事实上,我可以简单地使用单行来处理更重要的数据,并一次执行一个,这是巨大的进步,我什至可以保存多个脚本,并且只需为我需要的每行数编写一个脚本绘制,但我确信有更好的方法,我只是不知道如何实现它......但是^.^
回复:选择问题基本上,您的 JSL 只是创建一些新的 JSL。 当涉及到 SendToReport 部分时,您已将代码硬连线为需要 3 个 offset_cols。 您已经知道这一点,但我要指出的一点是,您正在生成最终运行的 JSL 代码。 因此,您需要做的就是分解代码,以便检查 offset_cols 列表中有多少个元素,然后基于此,仅为这些元素生成 JSL 代码。回复:选择问题dt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
// add in the marker and transparency code
elements_txt = elements_txt ||
"Legend( 7 ) ), Points( X, Y, Legend(8))),
SendToReport(
Dispatch(
{},
\!"400\!",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( \!""
|| offset_cols[1] || "\!", 1 ), Item ID( \!""
|| offset_cols[2] || "\!", 1 ), Item ID( \!""
|| offset_cols[3] || "\!", 1 ) )
)}
)
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[5]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[6]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[7]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
if (cb9 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch9_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);因此,这使我能够运行 3 个不同的通道,不幸的是,我不能运行少于 3 个通道。 我可以运行更多,但任何附加通道都不会包含点路径,因此我无法像预期的那样选择线上的单独点。 如果我使用的频道少于 3 个,我最终会收到此警报

回复:选择问题哎呀,发现了一个问题,因为您将其从变量更改为静态,所以它仅适用于第一个图,并且我可能需要同时绘制多个图形(这就是变量的原因)我尝试为每个可能的列进行复制,这有效,但前提是我使用了包含的绘图数量,并且根据情况我可能会使用更少或更多。 我似乎无法让变量用于此调整,也许我们可以为附加行提供一个 if then 参数,这样如果我不绘制它们,它们就不会与脚本争论?
回复:选择问题哈扎!它有效,如果我选择一个超出我正在寻找的范围的通道,它确实会出错,但这完全没问题,因为据我所知,我不会这样做。
非常感谢!
回复:选择问题我对你的代码进行了一些修改。
1.我在代码中添加了更改标记大小和透明度
2. 您可能没有注意到以下问题,但是,在您创建的新列中,公式中包含 dt 和 i 的值。这些是可能改变的内存变量。(即保存表,以后启动 JMP 会话,打开数据表,这些列将导致错误,因为变量 dt 和 i 不再可用)。因此,我更改了代码以使公式具有硬连线值。
这是代码。我制作了一个模型数据表来测试代码,所以仍然可能存在一两个问题。
dt = Open();
col_list = dt << get column names( string );
Remove From( col_list, 1 ); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = Expr(
For( i = 1, i <= N Items( cols_to_plot ), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
// If used before, delete the column and then recreate it
If( Try( Column( dt, new_name ) << get name, "" ) != "",
dt << delete columns( new_name )
);
Insert Into( offset_cols, new_name );
// The variable i and the column name need to be changed to their
// static value for the column formulas to be correct
Eval(
Substitute(
Expr(
dt << New Column( new_name,
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( __cols_to_plot__ * __offset_list__ )
)
),
Expr( __cols_to_plot__ ), Parse( ":" || cols_to_plot[i] ),
Expr( __offset_list__ ), offset_list[i]
)
);
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
// add in the marker and transparency code
elements_txt = elements_txt ||
"Legend( 7 ) ), Points( X, Y, Legend(8))),
SendToReport(
Dispatch(
{},
\!"400\!",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( \!""
|| offset_cols[1] || "\!", 1 ) )
)}
)
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = New Window( "Graph Chemicals",
Panel Box( "Select channels to graph",
Lineup Box( N Col( 2 ),
Text Box( "Column" ),
Text Box( "Chemical Cal" ),
cb1 = Check Box( "Ch1" ),
ch1_neb = Number Edit Box(),
cb2 = Check Box( "Ch2" ),
ch2_neb = Number Edit Box(),
cb3 = Check Box( "Ch3" ),
ch3_neb = Number Edit Box(),
cb4 = Check Box( "Ch4" ),
ch4_neb = Number Edit Box(),
cb5 = Check Box( "Ch5" ),
ch5_neb = Number Edit Box(),
cb6 = Check Box( "Ch6" ),
ch6_neb = Number Edit Box(),
cb7 = Check Box( "Ch7" ),
ch7_neb = Number Edit Box(),
cb8 = Check Box( "Ch8" ),
ch8_neb = Number Edit Box(),
cb9 = Check Box( "Ch9" ),
ch9_neb = Number Edit Box(),
),
),
Panel Box( "Actions",
H List Box(
okb = Button Box( "OK",
If( cb1 << get( 1 ),
Insert Into( cols_to_plot, col_list[8] );
offset_value = ch1_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb2 << get( 1 ),
Insert Into( cols_to_plot, col_list[9] );
offset_value = ch2_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb3 << get( 1 ),
Insert Into( cols_to_plot, col_list[10] );
offset_value = ch3_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb4 << get( 1 ),
Insert Into( cols_to_plot, col_list[11] );
offset_value = ch4_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb5 << get( 1 ),
Insert Into( cols_to_plot, col_list[12] );
offset_value = ch5_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb6 << get( 1 ),
Insert Into( cols_to_plot, col_list[13] );
offset_value = ch6_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb7 << get( 1 ),
Insert Into( cols_to_plot, col_list[14] );
offset_value = ch7_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb8 << get( 1 ),
Insert Into( cols_to_plot, col_list[15] );
offset_value = ch8_neb << get;
Insert Into( offset_list, offset_value );
);
graph_expr;
nw << close window;
),
canb = Button Box( "Cancel", nw << close window ),
)
),
);
// Pre-check checkboxes if column exists
For( i = 1, i <= N Items( col_list ), i++,
If(
col_list[i] == "Ch1", cb1 << set( 1, 1 ),
col_list[i] == "Ch2", cb2 << set( 1, 1 ),
col_list[i] == "Ch3", cb3 << set( 1, 1 ),
col_list[i] == "Ch4", cb4 << set( 1, 1 ),
col_list[i] == "Ch5", cb5 << set( 1, 1 ),
col_list[i] == "Ch6", cb6 << set( 1, 1 ),
col_list[i] == "Ch7", cb7 << set( 1, 1 ),
col_list[i] == "Ch8", cb8 << set( 1, 1 ),
col_list[i] == "Ch9", cb9 << set( 1, 1 ),
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 8, Properties( 0, {Marker Size( 0 )}, Item ID( "CH2-Offset", 1 ) ) )}
)
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( "^offset_cols[i]^", 1 ) )
)}
)
)
);回复:选择问题所有文本都在上一篇文章的剧透窗口下,它看起来不太正确,所以我使用了图片,我不知道 JSL 按钮的用途,所以我只是复制/粘贴。
dt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text =
"\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
for (i = 1, i <= nitems(cols_to_plot), i++,
if (i == 1,
// then
gb_text = gb_text || evalinsert("\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\");
,
// else
gb_text = gb_text || evalinsert("\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\");
);
elements_txt = elements_txt || evalinsert("Y ( ^i^ ), ");
);
elements_txt = elements_txt || "Legend( 7 ) ), Points( X, Y, Legend(8))
,";
gb_text = gb_text || elements_txt || ") )";
eval(parse(gb_text));
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Marker Size( 0 ), Transparency( 0 )},
Item ID( "^offset_cols[i]^", 1 )
)
)}
)
)
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[14]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[15]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 )}, Item ID( "CH2-Offset", 1 ) )
)}
)
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Marker Size( 0 ), Transparency( 0 )},
Item ID( "^offset_cols[i]^", 1 )
)
)}
)
)
);回复:选择问题您对最新问题缺乏回应的部分原因是您显示代码的方式。以图片形式传递代码要求社区如果要尝试调试您的代码,则必须手动输入您的所有代码。您能否使用“插入代码”或更好的“插入 JSL 脚本”图标来输入代码。如果您的浏览器不支持其中任何一个,则可以将代码粘贴到响应中。
回复:选择问题
我-认为-它应该在这里结束,但我不断得到

不知道还能尝试什么,我尝试了几个不同的逻辑名称,但没有改变。
回复:选择问题太棒了,现在我们已经取得了进展,但我在将为此出现的对话插入我的脚本时遇到了麻烦。 当我进行调整时,脚本看起来像这样

但我无法弄清楚在哪里以及如何将修饰符插入到我的基本脚本中。

我很想更好地理解这一点,但目前理解比效果更重要^.^(保存为图像而不是文本,因为文本工作得很奇怪,需要遵循文本代码)
查看更多...
回复:选择问题如果右键单击图表图例中的点,可以更改点的大小和点的颜色。回复:选择问题附录:
好的,所以我修改了我的图表,所以它也使用点。 然而,这些点太大了,弄乱了我的图片。 有没有办法将点绘制得更小,甚至绘制它们但删除可见点? 我不需要这些点,我只需要能够选择一条线的特定线段,但你无法这样做。 感谢您的额外帮助!

回复:选择问题好吧,这回答了问题,但提出了一个新问题。 另一方面,现在我知道一种非常快速的方法来找到峰值而不需要付出很多努力,但是我真的希望能够只选择线段。 在这种情况下,折线图是表示数据的最佳方式,因为它是流体流动,我们沿着时间范围收集数据点,但流体仍在这些点之间流动,而且还因为它反映了以其他格式显示的方式,因此很容易看出您正在查看的数据是否正确,或者数据是否明显超出所需参数。 我想知道是否有办法将其显示为一条线,但将其视为点...... *思考*好吧,无论如何,感谢您提供的信息!
回复:选择问题大家好,
选择一条线将选择组成该线的所有点。 您必须在线上有点才能仅选择该线的该区域。
希望有帮助。
克里斯
回复:选择问题这很有趣——同样的事情也发生在我身上。我还注意到套索工具变成了矩形而不是自由绘制的多边形。但只有在选择图形生成器中的线选项而不是点时才会发生这种情况。我猜测,随着为该变量的平均值绘制的线,所有点都会突出显示,因为所有点都用于计算平均值 - 但这只是一个猜测,我有兴趣看看是否有人可以解开这个谜团。至于您的其他问题,您可以使用 ColMax 和/或 ColRank 函数的某种组合来获得您正在寻找的分数吗?
回复:选择问题
这是一个相当简单的图表,只有两行数据,它应该非常简单,但由于某种原因,您可以看到仅选择峰值会突出显示整个电子表格。
第二部分我更多地寻找一种将其编写到我当前拥有的脚本中的方法,如果我必须寻找数据点并选择它们,则该点已经被击败,我知道的变量是它出现的列,即每个参考峰值之前总是有一个 0,并且我只关心线上每次出现的峰值的最高点。
我当然会看一下这本书,但时间不等人,这个项目的目的是简化我们已经完成的任务,不需要 JMP 来寻找我们在 Excel 中已有的值,你知道^.^
回复:选择问题下面是选择了一些点的图表,从图表和数据表上都可以看出,哪些点已被选择。但是,您需要提供更多有关您所使用的图表以及数据表包含哪些内容的信息,以便尝试确定可能存在的问题。我建议您首先阅读安装 JMP 时提供的 Essential Graphing 书籍
帮助==>书籍==>基本绘图

关于你的第二个问题,是的,你可以从一条线上确定选定的点,并将它们的值显示在图表上。这可以通过指定标签应使用哪些列,然后选择要显示的数据点来完成。同样,这在《基本图形》一书中有所介绍