大家好,
我在我的腳本中使用標籤來幫助我過濾數據。 腳本顯示如下:
dt_daily << New Column( "Outliers Exclusion (Energy % from Controls)",
Numeric,
Continuous,
Formula( If( !labeled( Row State() ) , "Clean Bad Data", "Show Bad Data" ) ),
eval formula
);
Close( dt_subdaily );
Close( dt_dailysplit );
Wait( 0 );
New Window( "Energy % from Controls",
dt_daily << Graph Builder(
Size( 800, 500 ),
Show Control Panel( 0 ),
Variables( X( :Date ), Y( :Name( "Energy % from Controls" ) ), Group X( :SiteName ), Group Y( :Sequence ), Overlay( :SampleDescription ) ),
Elements( Position( 1, 1 ), Points( X, Y, Legend( 16 ) ), Smoother( X, Y, Legend( 17 ) ) ),
//Button Box( "Include Bad Data" ,Row State() = Excluded State( 0 )),
Local Data Filter(
Auto clear( 0 ),
Add Filter(
columns(
:name( "Outliers Exclusion (Energy % from Controls)" ),
:SiteName,
:Sequence,
:SampleDescription,
:EquipmentName,
:TableRank,
:Name( "Energy % from Controls" ),
:Date
),
Where( :Name( "Energy % from Controls" ) >= -0.04 & :PPI_AH <= 0.06 ),
//if ( :name("Outliers Exclusion (Energy % from Controls)") == "Clean Bad Data", Row State() = Excluded State( 0 ))
),
SendToReport(
Dispatch( {}, "Date", ScaleBox, {Format( "m/d/y", 7 ), Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )} ),
Dispatch(
{},
"Energy % from Controls",
ScaleBox,
{/*Min( -0.04 ), Max( 0.06 ), Inc( 0.01 ), Minor Ticks( 1 ),*/
//Format( "Percent", 9, 1 ), Max( 0.01 ),
Add Ref Line( 0, "Solid", "Black", "", 1 ), Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
)
)
)
)
);
但是,我不希望顯示這些數字。 有什麼方法可以保留數據表中行的標籤,但從圖表中刪除標籤的數量?

如果有人可以提供幫助,非常感謝!
溫妮,
JMP 允許數據列充當標籤,並允許對行進行標記。 當行被標記時,標籤的值出現在圖表上。如果沒有標籤列,則行號會出現在圖表上。
由於我沒有您的表格,請查看下面的腳本。它:
- 隨機選擇 10 行並將它們標記為已標記
- 繪製圖形並註意那些標記的列現在顯示名稱
- 刪除列 :name 作為標籤,因此圖表現在顯示行號
- 然後顯示幾個替代選項。
將公式與行狀態函數一起使用時要小心。 如果用戶或您不小心更改了行狀態,那麼您的函數的值將自動更改。如果您想根據當前狀態設置值,請使用公式然後將其刪除,或使用“設置每個值”。
希望有所幫助。
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
//select 10 random rows in Big Class
xr = Random Shuffle( Index(1, nrow(dt)) ) [1::10];
dt << select rows(xr);
dt << Label(1);
dt << clear select;
biv = dt << Bivariate( Y( :weight ), X( :height ), Fit Line );
//---run to here ----
//Now you will see all the names since name is a label.
//Remove, Name as a Label
dt:name << set Labelled(0);
//---run to here ----
//now all the row numbers are visible If you use a formula for Labeled rows, when you
//remove row labeling, the formula will be updated all data will be Clean Bad Data,
//so use Set Each Value.
dt << New Column( "Outliers",
Character,
<<SET each="" value=""></SET>