更改 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 )}
)
)
);