二维图的横截面如何在 JMP 中沿 1D 线图垂直绘制 2D 图中的变化?
我来自 Matlab(MATLAB 中的等效项类似于这)
谢谢,
高级统计建模自动化和脚本编写消费者和市场研究数据存取回复:二维图的横截面现在可以通过以下方式找到解决方案图形生成器工具栏

回复:二维图的横截面哈!@ih打败了我。 我开始了一个类似的例子,但后来我参加了三个小时的会议。
Names Default to Here( 1 );
dt = New Table( "Slicing",
Add Rows( 2 ),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [-1, 1] )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [-1, 1] )
),
New Column( "Z",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
100 + 25 * :X - 3 * :X ^ 2 - 15 * :Y - 5 * :Y ^ 2 - 7 * :X * :Y
)
)
);
dt << Surface Plot(
Columns( :Z ),
Surface Color Theme( "Green to Black to Red" ),
Surface Color Theme2( "Green to White to Red" ),
Surface Color Theme3( "White to Black" ),
Surface Color Theme4( "Blue to Gray to Red" ),
Response Column Color Theme( "Blue to Green to Red" ),
Response Column Color Theme2( "Spectral" ),
Response Column Color Theme3( "Jet" ),
Response Column Color Theme4( "White to Blue" ),
Formula( "Z" ),
Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
SetVariableAxis( :X, Axis Data( {} ) ),
SetVariableAxis( :Y, Axis Data( {} ) ),
SetZAxis( :Z, Current Value( 95 ), Axis Data( {} ) ),
SetXVariable( :X ),
SetYVariable( :Y ),
Iso Value( 0, 75 ),
Frame3D( Set Rotation( -54, 0, 38 ) )
);
dt << Profiler(
Y( :Z ),
Profiler(
1,
Term Value( X( 0, Lock( 0 ), Show( 1 ) ), Y( 0, Lock( 0 ), Show( 1 ) ) )
),
SendToReport(
Dispatch(
{"Prediction Profiler"},
"10000",
ScaleBox,
{Min( 72.5 ), Max( 125.754437869822 ), Inc( 10 ), Minor Ticks( 0 )}
)
)
);回复:二维图的横截面您可以发布一些示例数据和迄今为止的脚本吗?
回复:二维图的横截面此外,等高线图(不是图形生成器的,使用等高线平台)可以保存网格数据。 只要您想要垂直或水平切片,它就应该是网格数据中的一行或一列。
dt = Open( "$sample_data/big class.jmp" );
// step 1: use the contour plot to get a grid of the data
cp = dt << Contour Plot(
X( :height, :weight ),
Y( :age ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 13 ), Max( 16.5 ), N( 8 ) )
);
nres = 100; // make this bigger if you think there is meaningful data there
dtGrid = cp << generate grid( nres, nres );
cp<<CLOSEWINDOW></CLOSEWINDOW>
// step 2: make the cross section
dtGrid:height<<SETMODELINGTYPE></SETMODELINGTYPE>
Drive the height selector with up and down arrows.使用向上和向下箭头驱动高度选择器。
编辑:网格数据被推断超出数据点的包络线。 横截面的末端可能会远远超出推断范围。 您可能需要匹配高度=61.5(等)处的等高线图(闭合的、上方的、也许保持打开的),以查看重量的有效范围是多少。 即使这样,等高线图也会在数据点形成的三角形之间进行一些线性插值。 Big Class 不是特别平滑或密集,因此您会看到许多奇怪的伪影,这些伪影会产生错误的细节感,即使在数据点的范围内也是如此。
回复:二维图的横截面谢谢。 我的二维图基于 Xdata、Ydata 和 Data。
您使用数据过滤器显示的内容看起来很有希望,但我似乎无法让它在一个 Xdata 值(对于所有 Ydata 值)处绘制切片。
我会继续看这边,但任何方向都会非常有帮助。
(我在JMP13)
回复:二维图的横截面不确定你的二维绘图是基于点还是公式。 如果是点,您可以使用图形生成器根据图表中的一个维度绘制目标值,并使用数据过滤器定义另一维度中的“切片”。

如果您正在探索列公式,那么我同意@马克贝利分析器是最简单的方法。 只需更改一个值的值即可查看另一个值的图。

以下是两者的脚本:
Names default to here(1);
dt = Open("$Sample_data/iris.jmp");
New Column("H1_1", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-3.50407799736543) + -1.69201212624413 * :Sepal length + 4.45798369366822 * :Sepal width))), Set Property("Intermediate", 1));
New Column("H1_2", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-4.34695576142641) + 0.578814453314083 * :Sepal length + -0.387699136913814 * :Sepal width))), Set Property("Intermediate", 1));
New Column("H1_3", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-14.9199578715582) + 8.0363609653296 * :Sepal length + -9.32672254743267 * :Sepal width))), Set Property("Intermediate", 1));
New Column("Predicted Petal length", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(9.72824082889675 + 0.825393378043811 * :H1_1 + 8.38378988028562 * :H1_2 + 1.62929374850912 * :H1_3), Set Property("Predicting", {:Petal length, Creator("Neural")}));
New Window("Plotting points",
H List Box(
Graph Builder(
Size( 522, 456 ),
Show Control Panel( 0 ),
Variables( X( :Sepal length ), Y( :Petal length ) ),
Elements( Points( X, Y, Legend( 295 ) ), Line( X, Y, Legend( 297 ) ) ),
Local Data Filter(
Add Filter(
columns( :Sepal width ),
Where( :Sepal width >= 2.9 & :Sepal width <= 3.1 )
)
)
),
Contour Plot(
X( :Sepal width, :Sepal length ),
Y( :Petal length ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 2 ), Max( 6 ), N( 5 ) ),
SendToReport(
Dispatch(
{},
"1",
ScaleBox,
{Add Ref Line(
{2.9, 3.1},
"Solid",
"Medium Dark Magenta",
"Slice",
1,
0.25
)}
)
)
)
)
);
//Profiler
Profiler(
Y( :Predicted Petal length ),
Profiler(
1,
Term Value(
Sepal length( 6.302, Lock( 0 ), Show( 1 ) ),
Sepal width( 3.125, Lock( 0 ), Show( 1 ) )
)
),
Expand,
SendToReport(
Dispatch(
{"Prediction Profiler"},
"Profiler",
FrameBox,
{Frame Size( 320, 260 )}
),
Dispatch(
{"Prediction Profiler"},
"Profiler",
FrameBox( 3 ),
{Frame Size( 320, 260 )}
)
)
);
更新:将预测列的列公式添加到脚本中。
回复:二维图的横截面谢谢,探查器选项看起来很有用,但有很多选项。 我会仔细看看的。
我正在寻找的是基于脚本的方法。
对于 2D 图,如何获取 x 切片(对于给定 y 值)或 y 切片(对于给定 x 值)。 这就是我现在想做的一切。回复:二维图的横截面请参阅 JMP 帮助中的书籍了解分析器。