グラフビルダーで列と関数線のデータポイントを重ね合わせようとしています。しかし、変数を同じ軸に配置して重ね合わせると、必ず以下のどちらかの結果が得られてしまいます。
- データポイントと関数の両方を点として描画するか、
- どちらも線として描かれています。
私が望んでいるのはシンプルです。
- 列のデータは点として表示され、
- 関数は線として表示されます。
同じグラフに重ねて表示されます。
以下は、2つのランダム列と1つの関数列を含む小さなサンプルテーブルを生成するJSLスクリプトです。ここで、列1と列2はランダムな値であり、関数列は列1の多項式関数です。グラフビルダーを使用すると、JMPはこれらを重ね合わせない限り別々のグラフに配置しますが、重ね合わせると、グラフビルダーはすべてのY変数で同じ要素タイプを共有するように強制します。
複数の Y 変数がオーバーレイ内で同じ軸を共有している場合、グラフ ビルダーではポイントと線を混在させることができないようです。
添付されているのは、現在表示されているグラフです。グラフビルダーが関数とデータポイントを別々の軸に配置するか、重ね合わせた際に同じ要素タイプに強制的に配置しているかを示しています。ここではJMP 18を使用しています。
グラフビルダーで、異なる要素タイプを維持しながら、関数線とデータポイントを同じグラフに重ね合わせる方法があるかどうかご存知の方はいらっしゃいますか?それとも、この場合、グラフビルダーには制限があるのでしょうか?
New Table( "Function_plot",
Add Rows( 10 ),
New Script(
"plot_function",
Graph Builder(
Variables( X( :Column 1 ), Y( :function ), Y( :Column 2 ) ),
Elements( Position( 1, 1 ), Formula( X, Y, Legend( 13 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch( {}, "400", LegendBox,
{Legend Position( {13, [1], 7, [0]} )}
)
)
)
),
New Column( "Column 1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [3, 1, 5, 9, 3, 12, 15, 19, 21, 17] ),
Set Display Width( 53 )
),
New Column( "Column 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [22, 76, 34, 19, 9, 45, 78, 63, 19, 5] ),
Set Display Width( 53 )
),
New Column( "function",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :Column 1 ^ 3 + 5 ),
Set Selected,
Set Display Width( 47 )
)
);
Graph Builder(
Variables( X( :Column 1 ), Y( :function ), Y( :Column 2 ) ),
Elements( Position( 1, 1 ), Formula( X, Y, Legend( 13 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch( {}, "400", LegendBox, {Legend Position( {13, [1], 7, [0]} )} )
)
);