JMPersの皆さん、こんにちは。
大規模な顧客に JMP を使用するよう説得しようとしています。現在、彼らのアプリケーションの 1 つを JMP で再現するのに苦労しています。
私が直面する最初の問題は、オーバーレイ オプションを使用している間、行状態からの色を維持したいということです。
各部分 (Y 軸) の 2 点間の接続線を含む上記のグラフ (青と赤の色の点を含む) が必要です。
オーバーレイを使用して接続線を取得できますが、色を手動で調整する必要があります。
同時に、複数の仕様の上限と下限をグラフに追加する必要があります。
最終的には、次のようなグラフが得られると思います。
複数の手動手順 (フレーム コンテンツのコピー & ペーストなど) を使用してグラフを作成することはできましたが、目標は、特に対話性を維持するために、標準のグラフ ビルダー ツールだけを使用してこのプロットを生成することです。
何かアドバイスをいただければ幸いです。
ありがとう、
セバスチャン
これは指定されたデータ構造になります。
New Table( "Sample",
Add Rows( 20 ),
New Column( "Part ID",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
),
New Column( "X1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] )
),
New Column( "X2",
Character,
"Nominal",
Set Values(
{"cold", "cold", "cold", "cold", "cold", "cold", "cold", "cold", "cold",
"cold", "medium", "medium", "medium", "medium", "medium", "medium",
"medium", "medium", "medium", "medium"}
)
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If(
:X2 == "cold", Random Normal() + 10,
:X2 == "medium", Random Normal() + 12,
Random Normal()
)
)
),
New Column( "Y_USL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16]
)
),
New Column( "Y_LSL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] )
),
Set Row States(
[768, 768, 1280, 1280, 1280, 1280, 1280, 1280, 768, 768, 768, 768, 1280,
1280, 1280, 1280, 1280, 1280, 768, 768]
)
)
ところで、「JSL Syntax Highliger」へのリンクが壊れているようです。 少なくとも私は空のページに行き着きます。
JSL スクリプトをほとんど使用せずに、目的の結果を達成できます。 まず、範囲誤差バーを含む棒グラフを作成します。 次に、バーの透明度をゼロに設定して、バーが消えます。 次に、Shift キーを押しながらクリックして、一連の点を追加します。 この JSL をスクリプト ウィンドウに保存します。
スクリプトの唯一の部分は、Col Maximum()/ を使用することです。列の最小値()基準線を描画する関数です。

Graph Builder(
Size( 663, 468 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :Y ), Y( :Part ID ) ),
Elements(
Bar( X, Y, Legend( 16 ), Error Bars( "Range" ) ),
Points( X, Y, Legend( 14 ), Jitter( 0 ) )
),
SendToReport(
Dispatch(
{},
"Y",
ScaleBox,
{Format( "Best", 12 ), Min( 5.64697504725641 ), Max( 16.37329465957 ),
Inc( 2 ), Minor Ticks( 1 ),
Add Ref Line( Col Minimum(:Y_LSL), "Dashed", "Red", "", 2 ),
Add Ref Line( Col Maximum(:Y_USL), "Dashed", "Red", "", 2 ),
Add Ref Line( Col Maximum(:Y_LSL), "Solid", "Blue", "", 2 ),
Add Ref Line( Col Minimum(:Y_USL), "Solid", "Blue", "", 2 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
16,
Properties( 0, {Fill Color( 2 ), Transparency( 0 )} )
)}
),
Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 4 )} )
)
);以下は、出力グラフに必要なものを作成するスクリプトです。 先ほどと同様にサンプル データ テーブルを追加しましたが、1 つ追加があります。 グラフ ビルダーに行の状態の色と同じ色を使用させるコツは、実際には Part_ID の値の色を希望の色に設定することです。 次に、グラフ ビルダーはそれらの色をオーバーレイに使用します。 軸参照線もグラフ ビルダー コードに追加されます。 ここで、私が提供しているコードは静的コードですが、JSL はデータ テーブルを読み取って必要な参照行を把握し、必要に応じてグラフ ビルダー コードを変更するだけで、必要なプラットフォーム コードを簡単に生成できます。 最後に、実際の線の色を手動で変更し、グラフ ビルダー スクリプト全体を保存しました。 あなたの質問から、望む結果を得る方法を知りたいのだと思いました。 ということで私の返答。 一般的なデータ テーブルからグラフを作成することは私の回答には含まれていませんが、確かにスクリプト化することができます。
Names Default to Here( 1 );
New Table( "Sample",
Add Rows( 20 ),
New Column( "Part ID",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Property( "Value Colors", {1 = 3, 2 = 3, 3 = 5, 4 = 5, 5 = 5, 6 = 5, 7 = 5, 8 = 5, 9 = 3, 10 = 3} ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
),
New Column( "X1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] )
),
New Column( "X2",
Character,
"Nominal",
Set Values(
{"cold", "cold", "cold", "cold", "cold", "cold", "cold", "cold", "cold", "cold", "medium", "medium", "medium",
"medium", "medium", "medium", "medium", "medium", "medium", "medium"}
)
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( If( :X2 == "cold", Random Normal() + 10, :X2 == "medium", Random Normal() + 12, Random Normal() ) )
),
New Column( "Y_USL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16] )
),
New Column( "Y_LSL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] )
),
Set Row States(
[768, 768, 1280, 1280, 1280, 1280, 1280, 1280, 768, 768, 768, 768, 1280, 1280, 1280, 1280, 1280, 1280, 768, 768]
)
);
Graph Builder(
Size( 509, 443 ),
Show Control Panel( 0 ),
Variables( X( :Y ), Y( :Part ID ), Overlay( :Part ID ) ),
Elements( Line( X, Y, Legend( 4 ), Row order( 1 ) ), Points( X, Y, Legend( 6 ), Jitter( 0 ) ) ),
SendToReport(
Dispatch(
{},
"Y",
ScaleBox,
{Min( 5.43667408790577 ), Max( 16.635593220339 ), Inc( 2 ), Minor Ticks( 0 ),
Add Ref Line( 16, "Dashed", "Red", "", 2 ), Add Ref Line( 15, "Solid", "Medium Dark Blue", "", 2 ),
Add Ref Line( 7, "Solid", "Medium Dark Blue", "", 2 ), Add Ref Line( 6, "Dashed", "Medium Dark Red", "", 2 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
4,
Properties( 0, {Line Color( 0 )} ),
Properties( 1, {Line Color( 0 )} ),
Properties( 2, {Line Color( 0 )} ),
Properties( 3, {Line Color( 0 )} ),
Properties( 4, {Line Color( 0 )} ),
Properties( 5, {Line Color( 0 )} ),
Properties( 6, {Line Color( 0 )} ),
Properties( 7, {Line Color( 0 )} ),
Properties( 8, {Line Color( 0 )} ),
Properties( 9, {Line Color( 0 )} )
), Legend Model(
6,
Properties( 0, {Marker( "FilledCircle" )} ),
Properties( 1, {Marker( "FilledCircle" )} ),
Properties( 2, {Marker( "FilledCircle" )} ),
Properties( 3, {Marker( "FilledCircle" )} ),
Properties( 4, {Marker( "FilledCircle" )} ),
Properties( 5, {Marker( "FilledCircle" )} ),
Properties( 6, {Marker( "FilledCircle" )} ),
Properties( 7, {Marker( "FilledCircle" )} ),
Properties( 8, {Marker( "FilledCircle" )} ),
Properties( 9, {Marker( "FilledCircle" )} )
)}
)
)
);
