わかりました私は非常に特定の要求があり、うまくいけばそれはあなた達をあまりにも多くの問題にならないでしょう、私はJMPに非常に新しいので、これを解決するための手助けが欲しいのですが それは比較的簡単であるべきであるように思えます(非常に簡単であれば私はすでにそれを考え出したかもしれないので相対的です;)
タスク:Excelドキュメントを開いてデータをインポートする(デフォルトの設定はこの特定のデータ文字列に対して、少なくとも私が必要としているものに対してはうまくいきます)
- 1列はTime [sec]、残りはその時間枠内のデータです。現時点ではCh1-Ch8列のデータにのみ関係しています。そしてもちろん時間ですが、それはグラフのためだけです。
- データがインポートされたら、グラフにどの列(CH1-CH8)を表示するかを尋ねるプロンプトが表示されます。続いて、化学薬品のオフセット(この場合はスケール、専門用語によるオフセットと呼びます)を尋ねます。 列の値に特定の数を掛けた値が問題の化学物質に対するものであるか、あるいはプリセットリストから化学物質を選択するためのメニューさえあります。
- それが完了すると、計算された「オフセット」、およびピーク値を使用して、グラフに特定のチャンネルを表示させるのはかなり簡単なはずです。
既知のハングアップ。
- Excelから複数のファイルをインポートすることは個々のインポートほど賢くはないようです。もしインポートの過程で特定の列が何であるかを指定できれば、time [sec]とCH1-CH8は数値/連続であることがわかっています
私が言ったように、それは合理的であるように思えます、私は少しそれに対して私の頭を打ったでしょう、しかしそれは本当に昨日有用だったであろう。!
ありがとうございます。それは非常に実行可能で、編集する必要があるものを理解するのに数分しかかかりませんでした。それで、必要なことを実行できます。スクリプトをよく理解すれば、ある時点で効率が上がる可能性があります。私がやりたいこと!
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] || "-Offset";
Insert Into( 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 ) ) ,";
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( "Offset" ),
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(),
),
),
Panel Box( "Actions",
H List Box(
okb = Button Box( "OK",
If( cb1 << get( 1 ),
Insert Into( cols_to_plot, col_list[5] );
offset_value = ch1_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb2 << get( 1 ),
Insert Into( cols_to_plot, col_list[6] );
offset_value = ch2_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb3 << get( 1 ),
Insert Into( cols_to_plot, col_list[7] );
offset_value = ch3_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb4 << get( 1 ),
Insert Into( cols_to_plot, col_list[8] );
offset_value = ch4_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb5 << get( 1 ),
Insert Into( cols_to_plot, col_list[9] );
offset_value = ch5_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb6 << get( 1 ),
Insert Into( cols_to_plot, col_list[10] );
offset_value = ch6_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb7 << get( 1 ),
Insert Into( cols_to_plot, col_list[11] );
offset_value = ch7_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb8 << get( 1 ),
Insert Into( cols_to_plot, col_list[12] );
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", cb4 << set( 1, 1 ),
col_list[i] == "Ch6", cb4 << set( 1, 1 ),
col_list[i] == "Ch7", cb4 << set( 1, 1 ),
col_list[i] == "Ch8", cb4 << set( 1, 1 ),
)
);
データを処理するために不要な生データ行がたくさんあるので、新しい修正行をスプレッドシートの後の方に配置しますが、今のところ作業するのは十分に簡単です。
これであなたは始められるはずです。 ここにあるいくつかの高度なテクニック、特にグラフの動的作成。
dt = New Table( "chemical", Add Rows( 10 ),
New Column( "Time[sec]", Numeric, "Continuous", Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ) ),
New Column( "Ch1", Numeric, "Continuous", Format( "Best", 12 ),
Set Values(
[0.405479144770652, 0.96118725137785, 0.184666735585779,
0.0779315158724785, 0.27096574800089, 0.274306696141139,
0.499865497928113, 0.645765431923792, 0.850604736013338,
0.375170755432919] ) ),
New Column( "Ch2", Numeric, "Continuous", Format( "Best", 12 ),
Set Values(
[-1.49768617758238, 0.627178362585814, 0.444456848007608,
0.23009213128918, 0.191183820733896, -0.871513987372999,
0.117414289530274, 0.673226666360769, 2.21437748894808,
-0.757598019757669] ) ),
New Column( "Ch3", Numeric, "Continuous", Format( "Best", 12 ),
Set Values(
[0.58753531659022, 0.722538525937125, 0.305761067429557,
0.53906583529897, 0.635318850399926, 0.701098019722849,
0.746448054211214, 0.526889791944995, 0.749249363318086,
0.959693510085344] ) )
);
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] || "-Offset";
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 ) ) ,";
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("Offset"),
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(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[1]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[2]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[3]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[4]);
offset_value = ch4_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),
);
);
JMP 14は私が持っているものです、そして、はい、Ch1など... 実際の列名です。私はスケール/オフセットタブを発見し、手動で化学オフセットを入力するためにそれを使用することができますが、私はプロセスを自動化しようとしています。
グラフの種類は線で、時間はXの値、チャンネルはYの値です。

私はJSLを使用してそれを自動化する方法を見つけようとしていますが、私はまだインターフェースについては本当に新しいですし、直感的かもしれないいくつかのものはまだクリックしていません。Excelファイルは他のプログラムから自動的に生成されるため、常に同じ形式になります。指定した列を探すためにスクリプトを作成するのはそれほど難しいことではありません。スクリプト言語にはまだ慣れていません。自分のニーズに合わせて編集できるようなスクリプトをすでに誰かが手に入れていることを願っています。スクリプトを一から選んで好きなように実行するのはかなり便利です。
情報のおかげで!
ダミオン、
どのバージョンのJMPを使用しているのか、どのJMPグラフ/プラットフォームを使用するのかについては触れられていません。また、これらの各列の最初の行に化学名が格納されているか、またはCh1、Ch2、...、Ch8だけの名前です。
JMPはグラフと分析のためのかなり標準的なインターフェースを持っています。 Yを化学物質(Ch1-Ch8)、XをTime [sec]とすると、Fit Y by Xを使用すると仮定します。 各化学物質を追加する前に、右クリックして選択変換>スケールオフセットスクリーンショットを見てください。乗数に1を使用して、オフセットを指定します。Yに変換された化学物質を使用してください。

これは自動プロンプトではありませんが、ユーザーインターフェイス(UI)を介してこれを行う方法です。
もちろん、JMPスクリプト言語(JSL)を使用して、タスクを自動化し、特定のニーズに合わせて調整することができます。
選択したExcel列のみを読み込む要求に関しては、複数の方法がありますが、Excelファイルを設定する方法や、Excelをデータベースとして読み込むODBC接続があるかどうかなどによって異なります。 ダミーのExcelシートを提供できれば、より具体的な回答を得ることができます。