需要帮助从 JSL 中的图元中删除标签你好,
我有一个脚本,可以在图形生成器中显示几个指标平均值(线),还可以生成具有单独指标(点)的图形。
[1] — 我想从图基元中删除标签,但到目前为止还没有成功。

在这个例子(下面的脚本)中,我想删除“Position2 和 Mean()”标签,只保留图形(带有它自己的符号)。
从脚本指南来看,它似乎需要一个 Gridlet(P 704),但我的所有尝试都失败了。
[2] - 当第一张图上的线条彼此靠近时(例如:速度和:高度),当我移动鼠标尝试单击它以打开包含单个数据的图形生成器时,图形往往会消失。是否有一个选项“单击”可以直接打开它,而不是“悬停线条然后悬停图形然后单击”?(脚本指南 P696 提到了“单击”选项,但不清楚)
你能帮我一下吗?
提前致谢
-牧师
请参阅我的最后一个“稳定”版本
Names Default To Here( 1 );
dt = Open( "$sample_data\Football.jmp" );
y_values = {"Height", "Weight", "Fat", "Speed"};
RelEventCol = "Position2";
variables_expr = Eval Expr( Variables( X( As Column( dt, Expr( RelEventCol ) ) ) ) );
Show( variables_expr );
For Each( {y_col}, y_values,
temp_expr = Expr( Y() );
Insert Into( temp_expr, Name Expr( As Column( dt, y_col ) ) );
Insert Into( temp_expr, Name Expr( Position( 1 ) ) );
Insert Into( variables_expr, Name Expr( temp_expr ) );
);
Show( variables_expr );
gb_expr = Expr(
Graph Builder( Show Control Panel( 0 ) )
);
temp_expr3 = Expr( Line() );
Insert Into( temp_expr3, Name Expr( X ) );
For Each( {y_col, idx}, y_values,
temp_expr2 = Expr( Y() );
Insert Into( temp_expr2, idx );
Insert Into( temp_expr3, Name Expr( temp_expr2 ) );
);
Show( temp_expr3 );
Insert Into( temp_expr3, Name Expr( Legend( 7 ) ) );
Show( temp_expr3 );
temp_expr4 = Expr( Elements() );
Insert Into( temp_expr4, Name Expr( temp_expr3 ) );
Show( temp_expr4 );
Insert Into( gb_expr, Name Expr( variables_expr ) );
Insert Into( gb_expr, Name Expr( temp_expr4 ) );
Insert Into(
gb_expr,
Name Expr(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Set Graphlet(
Picture(
dt << Graph Builder(
Size( 800, 700 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( As Column( dt, Expr( RelEventCol ) ) ), Y( Column( local:_measurements ) ) ),
Elements( X, Y )
);
),
Skip Filters( 1, Column( dt, Name Expr( RelEventCol ) ) )
)
}
)
)
);
Show( gb_expr );
Eval( gb_expr );自动化和脚本基础数据分析与建模回复:需要帮助从 JSL 中的图元中删除标签悬停标签很可能是您正在寻找的https://www.jmp.com/support/help/en/18.1/index.shtml#page/jmp/hover-labels.shtml# 。单击的目的是当用户单击悬停标签上的缩略图时触发
回复:需要帮助从 JSL 中的图元中删除标签几周前,我找到了如何删除悬停标签中不需要的部分的方法。下面是其中一种方法。
Names Default To Here( 1 );
dt = Open( "$sample_data\Football.jmp" );
y_values = {"Height", "Weight", "Fat", "Speed"};
RelEventCol = "Position2";
variables_expr = Eval Expr( Variables( X( As Column( dt, Expr( RelEventCol ) ) ) ) );
Show( variables_expr );
For Each( {y_col}, y_values,
temp_expr = Expr( Y() );
Insert Into( temp_expr, Name Expr( As Column( dt, y_col ) ) );
Insert Into( temp_expr, Name Expr( Position( 1 ) ) );
Insert Into( variables_expr, Name Expr( temp_expr ) );
);
Show( variables_expr );
gb_expr = Expr(
Graph Builder( Show Control Panel( 0 ) )
);
temp_expr3 = Expr( Line() );
Insert Into( temp_expr3, Name Expr( X ) );
For Each( {y_col, idx}, y_values,
temp_expr2 = Expr( Y() );
Insert Into( temp_expr2, idx );
Insert Into( temp_expr3, Name Expr( temp_expr2 ) );
);
Show( temp_expr3 );
Insert Into( temp_expr3, Name Expr( Legend( 7 ) ) );
Show( temp_expr3 );
temp_expr4 = Expr( Elements() );
Insert Into( temp_expr4, Name Expr( temp_expr3 ) );
Show( temp_expr4 );
Insert Into( gb_expr, Name Expr( variables_expr ) );
Insert Into( gb_expr, Name Expr( temp_expr4 ) );
Insert Into(
gb_expr,
Name Expr(
Dispatch( {}, "Graph Builder", FrameBox,
{Set Graphlet(
Picture(
dt << Graph Builder(
Size( 800, 700 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( As Column( dt, Expr( RelEventCol ) ) ), Y( Column( local:_measurements ) ) ),
Elements( X, Y )
);
),
Skip Filters( 1, Column( dt, Name Expr( RelEventCol ) ) )
), Set Gridlet(
Expunge(
{{Matcher( "Position2" )}, {Matcher( "Mean(Height)" )}, {Matcher( "Mean(Weight)" )}, {Matcher( "Mean(Fat)" )},
{Matcher( "Mean(Speed)" )}}
)
) //Removes these from the default gridlet
}
)
)
);
Show( gb_expr );
Eval( gb_expr );回复:需要帮助从 JSL 中的图元中删除标签可能应该使用这个,而不是“Mean(...)”值列表。它将删除名称中带有“Mean”的所有内容。
{Matcher( Pat Regex( "Mean" ) )}
回复:需要帮助从 JSL 中的图元中删除标签谢谢大家的帮助。
效果很好:)
- 传教士