選擇問題我創建了一個圖表,當我選擇其中的一部分時,它會突出顯示整個 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 書籍
幫助==>書籍==>基本繪圖

關於你的第二個問題,是的,你可以從一條線上確定選定的點,並將它們的值顯示在圖表上。這可以通過指定標籤應使用哪些列,然後選擇要顯示的數據點來完成。同樣,這在《基本圖形》一書中有所介紹