在長條圖中顯示百分之零你好,
我建立了一個以百分比為單位的長條圖,還需要顯示零百分比(在片段組2中)。
Names Default To Here( 1 );
dt = New Table("Test");
dt << new column ("C", numeric, Continuous);
dt << new column ("D", numeric, Continuous);
dt << new column ("E", numeric, Continuous);
:C << set values([1,2,3]);
:D << set values([1,2,3]);
:E << set values([1,0,0.5]);
dt << new column ("Percent", numeric, Continuous, Format( "Percent", 15, 3 ), Formula(:E/:D));
dt << Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables( Y( :Percent ), Group X( :C ) ),
Elements( Bar( Y, Legend( 4 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch(
{},
"Percent",
ScaleBox,
{Min( -0.113265306122449 ), Max( 1.08673469387755 ), Inc( 0.2 ),
Minor Ticks( 0 )}
)
)
);謝謝你的幫忙!
回覆:在長條圖中顯示百分之零謝謝這效果很好!回覆:在長條圖中顯示百分之零另一種可能的方法可以在此連結中找到:
https://community.jmp.com/t5/Discussions/force-all-histogram-levels-on-bar-graph-even-if-count-0/mp/195336#M41641
它應該適用於百分比,但我還沒有嘗試過。
回覆:在長條圖中顯示百分之零你好@富邑集團,
我不知道有什麼方法可以強制 JMP 顯示真正 0 值的標籤。 這是一種解決方法,但我過去所做的就是向一個值添加少量,以便 jmp 將四捨五入到 0 並顯示該四捨五入的值。 例如,使用您的範例,透過將 :E[2] 的值設為 0.000000000000001 而不是 0,0% 標籤將顯示在圖表上:
Names Default To Here( 1 );
dt = New Table("Test");
dt << new column ("C", numeric, Continuous);
dt << new column ("D", numeric, Continuous);
dt << new column ("E", numeric, Continuous);
:C << set values([1,2,3]);
:D << set values([1,2,3]);
:E << set values([1,0.000000000000001,0.5]);
dt << new column ("Percent", numeric, Continuous, Format( "Percent", 15, 3 ), Formula(:E/:D));
dt << Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables( Y( :Percent ), Group X( :C ) ),
Elements( Bar( Y, Legend( 4 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch(
{},
"Percent",
ScaleBox,
{Min( -0.113265306122449 ), Max( 1.08673469387755 ), Inc( 0.2 ),
Minor Ticks( 0 )}
)
)
);