更改 X 軸標籤方向你好,
在變異性圖表中,我試圖更改 X 變量之一的文本方向。 這是代碼的一部分。
X_List = {"SPLIT", "LOTID", "Tool", "Boat", "Wfrid"};
varChartObj = Variability Chart(
Y( collist[i] ),
X( Eval(X_List) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 0 ),
Show Box Plots( 1 ),
);
report(varChartObj)[Frame Box(1)]<< Row Legend( Eval(X_Legend), Color( 1 ), Marker( 0 ) );
report(varChartObj)[axisbox(1)]<< Add Ref Line( LSL, "Solid", "Red", "LSL", 1 );
report(varChartObj)[axisbox(1)]<< Add Ref Line( USL, "Solid", "Red", "USL", 1 );
report(varChartObj)[axisbox(1)]<< Add Ref Line( Target, "Dashed", "Red", "Target", 1 );
report(varChartObj)[axisbox(1)]<< min(LSL-0.1*(USL-LSL));
report(varChartObj)[axisbox(1)]<< max(USL+0.1*(USL-LSL));
report(varChartObj)[axisbox(1)]<< Inc(0.1*abs(USL-LSL));
如果有人能告訴我如何實現這一目標,我將不勝感激。 假設我想將 X 變量“工具”更改為垂直方向。
謝謝。
回复:更改 X 軸標籤方向在沒有實際的變異性圖表 JSL 的情況下,很難找出問題所在。人們需要檢查報告樹結構以找出為什麼對 NomAxisBox(2) 的引用可能不是正確的引用。下面是一個簡單的腳本,指定了 3 個 X 列,並且所有 3 個軸值都旋轉。然後代碼返回並將第三級刻度標籤更改回未旋轉。嘗試檢查樹結構,以便您了解它是如何工作的。
names default to here(1);
New Table( "Example",
Add Rows( 15 ),
New Column("lot_id",
Character,
"Nominal",
Set Values(
{"lot1", "lot1", "lot1", "lot1", "lot1", "lot2", "lot2", "lot2", "lot2",
"lot2", "lot3", "lot3", "lot3", "lot3", "lot3"}
)
),
New Column("wafer",
Numeric( 1 ),
"Nominal",
Set Values( [3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] )
),
New Column("SITE",
Numeric( 1 ),
"Nominal",
Set Values( [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5] )
),
New Column("NPN1",
Numeric,
"Continuous",
Format( "Best", 10 ),
Set Values(
[114.946183872216, 113.382890501824, 114.666518192776, 107.884015560041,
113.065582322339, 114.857323947632, 114.559464479242, 114.221688530977,
112.349531387849, 113.253501139582, 113.07512667471, 114.613256881221,
112.309137695657, 115.116308198793, 116.436528584316]
)
)
);
vc=Variability Chart(
Y( :NPN1 ),
X( :lot_id, :wafer, :SITE ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for NPN1"},
"",
NomAxisBox,
{Rotated Tick Labels( 1 )}
),
Dispatch(
{"Variability Chart for NPN1"},
"",
NomAxisBox( 2 ),
{Rotated Tick Labels( 1 )}
),
Dispatch(
{"Variability Chart for NPN1"},
"",
NomAxisBox( 3 ),
{Rotated Tick Labels( 1 ), Set Width( 980 ), Set Height( 21 )}
)
)
);
report(vc)[Nom Axis Box( 3 )] << Rotated Tick Labels( 0 );
回复:更改 X 軸標籤方向你好@tx尼爾森
感謝您的快速回复,我確實嘗試使用標稱軸框@ian_jmp在之前的答案中顯示
然而,使用標稱軸框(2)來旋轉它似乎不起作用......
抱歉問這個問題,我還是 JMP 新手
GenTabRpt = Function( {dt_chart, _CATE, _PARM},
rc = dt_chart << report;
_PARM = Munger( _PARM, (Munger( _PARM, 1, "/" )), "/", "_" );
If( Contains Item( _PARM, "IBL0", "_" ),
rc[axis box( 1 )] << Scale( "Log" ) << Show Minor Labels( 0 ) << Min( 1e-1 ),
);
If( Contains Item( _PARM, "Ir0", "_" ),
rc[axis box( 1 )] << Scale( "Log" ) << Show Minor Labels( 0 ) << Min( 1e-12 ) << Max( 1e-5 ),
);
If( Contains Item( _PARM, "T2P", "_" ),
rc[axis box( 1 )] << Scale( "Log" ) << Show Minor Labels( 0 ) << Min( 1e-9 ) << Max( 1e-3 ),
);
If(
Contains Item( _PARM, "Iread", "_" ) :|</img> Contains Item( _PARM, "Ir1", "_" ) :|</img> Contains Item( _PARM, "Ir0", "_" ) :|
Contains Item( _PARM, "T2P", "_" ),
rc[axis box( 1 )] << Format( Scientific ),
);
If( dt_chart == "Variability Chart[]",
rc[Text Edit Box( 1 )] << Set Font Size( 1 ) << Hide( 1 ),
);
rc[Nom Axis Box(2)] << Rotated Tick Labels( 0 );
rc[FrameBox( 1 )] << Marker Size( 3 );// << Frame Size (850,240);
rc[axis box( 2 )] << Show Major Grid( 1 );
/* << Label Row( 5, Label Orientation( "Vertical" ) )
<< Label Row( 6, Label Orientation( "Vertical" ) )
<< Label Row( 7, Label Orientation( "Vertical" ) )
<< Label Row( 8, Label Orientation( "Vertical" ) )
<< Label Row( 9, Label Orientation( "Vertical" ) )
<< Label Row( 10, Label Orientation( "Vertical" ) );
*/ rc[Outline Box( 2 )] << set title( Char( _PARM ) );
rc[Outline Box( 2 )] << save picture( RPTFolder || Char( _PARM ) || ".emf" );
If( _CATE == "MISSING",
_CATE = "WAT_Summary_Plot"
);
If( _CATE != _PreCATE,
tb << Append( _CATE, vlb = V List Box() );
vlb << append( rc );
dt_chart << close window;
,
vlb << append( rc );
dt_chart << close window;
);
Insert Into( TestList, Char( _PARM ) );
Insert Into( CateList, Char( _CATE ) );
_PreCATE = _CATE;
);
回复:更改 X 軸標籤方向必須為“可變性”對話框的“X 分組”區域中指定的每一列單獨調用每個特定的 NomAxisBox()
回复:更改 X 軸標籤方向你好@tx尼爾森
如果有很多行需要旋轉,是解決所有行數的唯一方法嗎?
或者它有什麼方法可以立即執行而不是使用循環來生成它?
先感謝您!
此致
回复:更改 X 軸標籤方向驚人的。 多謝。
回复:更改 X 軸標籤方向我相信你需要將 ScaleBox 更改為 AxisBox
回复:更改 X 軸標籤方向是的,我做到了。 查看生成的腳本後,我嘗試了:
報告(varChartObj)[ScaleBox(2)]<<標籤行(3,標籤方向(“垂直”));
但這沒有用。
順便說一句,我正在使用循環一次生成許多圖。
回复:更改 X 軸標籤方向“手動完成”幾乎總是好的,然後檢查 JMP 為您生成的代碼:
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Variability Chart(
Y( :height ),
X( :age, :sex ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for height"},
"",
NomAxisBox,
{Rotated Tick Labels( 1 )}
)
)
);