Xan,
在 JMP 15 中,您的脚本确实容纳纯白色非堆叠条形,但是,这需要通过脚本指定,模式选择器没有“无”选项。默认是填充颜色。 然后,如果您选择纯色左侧的面板,轮廓将是之前的纯色和空条或白色条。现在单击图例,然后选择填充颜色为白色,并且该条与背景混合,如果用户不认识或不知道正确的步骤顺序(选择一种颜色,而不是白色,然后转到图案选择器并选择固体旁边的那个)。

我提出这个建议是因为顺序相当奇怪。 我在回复一位想要每个堆叠条形图都有黑色轮廓的用户后提出了这个建议。
这是一个用于创建带有 2 个嵌入脚本的表的脚本。 第一个脚本写在用户回复中,第二个脚本显示填充图案。 现在,如果选择空白图案,则轮廓将保留。
只是我的 2 美分,如果颜色与背景颜色相同并且选择了空白图案,则应该使用一些相反的颜色或黑色作为轮廓,或者提示用户是否需要轮廓。 只是想法,不是条形图的大用户,我知道如何解决。
New Table( "GraphBuilder_CustomBars_Script",
Add Rows( 11 ),
New Script(
"Count vs. Day solid trick",
Graph Builder(
Size( 531, 450 ),
Show Control Panel( 0 ),
Variables( X( :Day ), Y( :Count ), Overlay( :Grades ) ),
Elements(
Bar( X, Y, Overlay( 0 ), Legend( 6 ), Summary Statistic( "Sum" ) ),
Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Fill Color( 0 )}, Item ID( "Sum", 1 ) )
), Legend Model(
7,
Properties( 3, {Fill Color( 0 )}, Item ID( "Total", 1 ) )
)}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "Count vs. Day" )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg( BarSeg( 1 ), Set Width Proportion( 0.56 ) )}
),
Dispatch(
{},
"400",
LegendBox,
{font( "Segoe UI", 9, "Bold" ),
Legend Position( {6, [-1], 7, [0, 1, 2, 3]} ),
Position( {-1, 0, 1, 2, 3} )}
)
)
)
),
New Script(
"Count vs. Day with Pattern",
Graph Builder(
Variables( X( :Day ), Y( :Count ), Overlay( :Grades ) ),
Elements( Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
7,
Properties(
0,
{Fill Pattern( "left slant light" )},
Item ID( "A", 1 )
),
Properties(
1,
{Fill Pattern( "vertical medium" )},
Item ID( "B", 1 )
),
Properties(
2,
{Fill Pattern( "h wave heavy" )},
Item ID( "C", 1 )
)
)}
)
)
)
),
New Column( "Day",
Character( 6 ),
"Nominal",
Set Values(
{"First", "First", "First", "Second", "Second", "Second", "Second",
"Third", "Third", "Third", "Third"}
),
Set Display Width( 49 )
),
New Column( "Grades",
Character( 13 ),
"Nominal",
Set Values(
{"A", "B", "Total", "A", "B", "C", "Total", "A", "B", "C", "Total"}
),
Set Display Width( 48 )
),
New Column( "Count",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [2, 2, 0.05, 2, 1, 1, 0.05, 1, 1, 2, 0.05] ),
Set Display Width( 48 )
)
);
可能的解决方法是,为该栏指定一个空模式:
Graph Builder(
Size( 524, 444 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Bar( X, Y, Legend( 4 ) ) ),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model( 4,
Properties( 0, {Fill Pattern( "none" )}, Item ID( "Mean", 1 ) )
)}
)
)
);