棒グラフでゼロパーセントを表示こんにちは、
パーセントで棒グラフを作成しますが、(スニプレット グループ 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 )}
)
)
);助けてくれてありがとう!
Re: 棒グラフでゼロパーセントを表示するありがとう、これはうまくいきます!Re: 棒グラフでゼロパーセントを表示する別の可能なアプローチは、次のリンクにあります。
https://community.jmp.com/t5/Discussions/force-all-histogram-levels-on-bar-graph-even-if-count-0/mp/195336#M41641
パーセントにも適用されるはずですが、試していません。
Re: 棒グラフでゼロパーセントを表示するこんにちは@TWE 、
JMP に真の 0 値のラベルを強制的に表示する方法を知りません。 これは少しの回避策ですが、私が過去に行ったことは、jmp が 0 に丸めてその丸めた値を表示するように、値に微量を追加することでした。 たとえば、この例を使用すると、:E[2] の値を 0 ではなく 0.000000000000001 に設定すると、グラフに 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 )}
)
)
);