グラフビルダー 棒グラフ ラベル オフセットグラフ ビルダーでは棒グラフに値のラベルを表示できますが、残念ながら棒グラフにデータもプロットすると、ラベルは完全に見えなくなります。

幸いなことに、ラベルを手動で再配置するのは比較的簡単です。位置合わせを正しく行うのは少し難しいですし、これを何度も行うのは比較的面倒です。グラフの 2 回目または 3 回目の繰り返しの後は、位置合わせを正しくするためにグラフ スクリプトを編集することさえ面倒です。JSL のちょっとした魔法を使えば、フレームとバー セグメントを見つけて、ラベルのオフセットを自動的に調整できます。
以下のスクリプトでは、サンプル データ テーブルが開かれ、グラフ スクリプトが実行され、その後にいくつかの書式設定の指示が続きます。
このスクリプトを使用するには、データ テーブル参照を置き換えるか、または「dt=current data table();」行のコメントを解除して、スクリプトを現在のテーブルに対して実行します。グラフ ビルダー スクリプトは例です。RTM > スクリプトの保存 > クリップボードを使用してグラフ ビルダー スクリプトを取得し、例の代わりに貼り付けます。
names default to here(1);
//paste your data table reference here, or just use the current data table.
dt=Open( "$SAMPLE_DATA/Big Class.jmp" );
//dt=current data table();
obj=dt<<
//Paste your graph builder script here
Graph Builder(
Size( 518, 470 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements(
Bar(X,Y,Legend( 4 ),
Error Interval( "Standard Error" ),
Label( "Label by Value" )),
Points( X, Y, Legend( 5 ) )),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(4,
Properties(0,{Fill Color( 0 ), Fill Pattern( "none" )},Item ID( "Mean", 1 )))}))
);
// End of graph builder script.
//Make a reference for the bar chart segments
fbi= N Items( (obj << xpath( "//FrameBox" )) );
for (ii=1, ii<=fbi, ii++,
frame = Report( obj )[FrameBox( ii )];
seg = (frame << Find Seg( "Bar Seg" ));
//Get variable used for the X axis
vars=obj<< Get Variables();
xx=vars[1];xx[1];
//Find the number of bars (or levels used to make bars)
Summarize( levels = By( eval(xx[1])));
Eval List( levels );
//Build an expression to change the offset
qq=expr(set label offset());
for (i=0, i<=nitems(levels)*fbi, i++, //Note there is a multipler, *fbi. This assumes each level is the same for each frame. Its kind of sloppy, might need to just replace it with a fixed value.
rr={};
insert into (rr, i); //This is the Bar number, starts with zero
insert into (rr,i); //This is the x offset, which is the same as the bar number
insert into(rr, 10); //This is the Y offset
insert into (qq, (rr));
);
//Make magic happen
eval(substitute(expr(seg<<QQ></QQ>
<P> </P>
<P>以前のブログ投稿では、区間線付きの棒グラフである「ダイナマイト」プロットに注釈付きのエラー バーを追加するための手順と自動化スクリプトについて説明しました。https <A href="https://community.jmp.com/t5/Byron-Wingerd-s-Blog/One-Way-ANOVA-Figure-for-Scientists/ba-p/265156" target="_blank">://community.jmp.com/t5/Byron-Wingerd-s-Blog/One-Way-ANOVA-Figure-for-Scientists/ba-p/265156</A></P><LINGO-TEASER id="lingo-teaser-777858" slang="en-US" mode="UPDATE"><P>データによってデータ ラベルが不明瞭になっていませんか?</P></LINGO-TEASER><LINGO-LABS id="lingo-labs-777858" slang="en-US" mode="UPDATE"><LINGO-LABEL>自動化とスクリプト</LINGO-LABEL><LINGO-LABEL>基本的なデータ分析とモデリング</LINGO-LABEL><LINGO-LABEL>データの探索と視覚化</LINGO-LABEL><LINGO-LABEL>結果の共有と伝達</LINGO-LABEL></LINGO-LABS>Re: グラフビルダーの棒グラフのラベルが修正されましたこんにちは@Byron_JMP 、素晴らしいトリックですね。とても役に立ちます。
あるいは、2 番目の棒グラフ要素にラベルを追加することもできます。
dt=Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 563, 522 ),
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables( X( :age ), Y( :height ) ),
Elements(
Bar( X, Y, Legend( 4 ), Error Interval( "Standard Error" ) ),
Points( X, Y, Legend( 5 ) ),
Bar( X, Y, Legend( 6 ), Bar Style( "Float" ), Label( "Label by Value" ) )
)
);
関連する問題が頻繁に発生します。水平ラベル用のスペースがないのです。

JSL を使用してラベルを回転させる回避策はありますか?
Re: グラフビルダーの棒グラフのラベルが修正されましたラベルを次のように回転させたいようです:

あなたの質問がなければ、私は試さなかったでしょう。フォントのプロパティと角度を設定できる、あまり知られていない JSL があります。正直、私はこれまでこのようなことは見たことがありませんが、とても素晴らしいと思います。
JSL は、Set Font( "" , 18 , "" , 90 ) です。フォントは ""、サイズは 18 ポイント、書式設定は ""、角度は 90 です。スクリプト インデックスの例では、フォントと書式設定が指定されていますが、これらを "" に置き換えると、デフォルトが使用されるようです。角度を -90 に変更すると、テキストは下から上に読み取られます。
names default to here(1);
//paste your data table reference here, or just use the current data table.
dt=Open( "$SAMPLE_DATA/Big Class.jmp" );
//dt=current data table();
obj=dt<<
//Paste your graph builder script here
Graph Builder(
Size( 518, 470 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements(
Bar(X,Y,Legend( 4 ),
Error Interval( "Standard Error" ),
Label( "Label by Value" )),
Points( X, Y, Legend( 5 ) )),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(4,
Properties(0,{Fill Color( 0 ), Fill Pattern( "none" )},Item ID( "Mean", 1 )))}),
Dispatch( {}, "Graph Builder", FrameBox,
{DispatchSeg(
BarSeg( 1 ),
Set Font( "", 18, "", 90 )
)}
)
)
);
// End of graph builder script.
//Make a reference for the bar chart segments
fbi= N Items( (obj << xpath( "//FrameBox" )) );
for (ii=1, ii<=fbi, ii++,
frame = Report( obj )[FrameBox( ii )];
seg = (frame << Find Seg( "Bar Seg" ));
//Get variable used for the X axis
vars=obj<< Get Variables();
xx=vars[1];xx[1];
//Find the number of bars (or levels used to make bars)
Summarize( levels = By( eval(xx[1])));
Eval List( levels );
//Build an expression to change the offset
qq=expr(set label offset());
for (i=0, i<=nitems(levels)*fbi, i++, //Note there is a multipler, *fbi. This assumes each level is the same for each frame. Its kind of sloppy, might need to just replace it with a fixed value.
rr={};
insert into (rr, i); //This is the Bar number, starts with zero
insert into (rr,i); //This is the x offset, which is the same as the bar number
insert into(rr, 10); //This is the Y offset
insert into (qq, (rr));
);
//Make magic happen
eval(substitute(expr(seg<<QQ></QQ>
<P> </P>Re: グラフビルダーの棒グラフのラベルのオフセットかっこいい!すごい!
ありがとう。
Re: グラフビルダーの棒グラフのラベルのオフセットうーん...
JSL を使わずに、どうやってラベルをグラフの上部から離すことができたのか疑問に思いました。
-> ああ: JMP17 !
したがって、「棒グラフ ラベル オフセット」の別の回避策として、次のようになります。
JMP 17に戻り、ユーザーの年齢をX軸にオーバーレイとして表示します。
// JMP 17!
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << new column("one", set each value(1));
dt << Graph Builder(
Variables( X( :age ), Y( :height ), Overlay( :age ), Color( :one ) ),
Elements(
Bar(
X,
Y,
Legend( 1 ),
Summary Statistic( "Mean" ),
Error Interval( "Standard Error" ),
Label( "Label by Value" )
),
Points( X, Y, Overlay( 0 ), Legend( 2 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties(
0,
{Fill Color( 0 ), Fill Pattern( "none" )},
Item ID( "1", 1 )
)
), Legend Model(
2,
Properties( 0, {Line Color( 0 )}, Item ID( "1", 1 ) )
)}
)
)
);

欠点:
- エラーバーにバグがあったようですが、JMP18 で修正されました。
- JMP 18 の他の優れた機能はありません。
Re: グラフビルダーの棒グラフのラベルのオフセットJSL の経験がないすべての JMP ユーザーのことを考えて...
実際には、GUI 内にラベルの配置を制御する機能があるはずです。
ああ、 @shampton82からの 2020 年の願い事には、こんなアイデアがあります:
グラフビルダー棒グラフデータラベルコントロール
Re: グラフビルダーの棒グラフのラベルのオフセットこのブログとウィッシュ リスト項目@hogiをリンクしていただきありがとうございます。JSL で多くの機能を追加できるのは素晴らしいことですが、JMP を紹介するときに最も恥ずかしいことの 1 つは、ユーザーが Excel で実行できるチャートのカスタマイズの非常に基本的な操作を実行できないことです (ユーザーは Excel に慣れているため、JMP で簡単に実行できないことに驚いています)。
@Byron_JMPこの素晴らしいカスタマイズを JSL ベース以外になるように、JMP チームと協力してください。
スティーブ
Re: グラフビルダーの棒グラフのラベルのオフセット同意する。
Re: グラフビルダーの棒グラフのラベルのオフセットJMP 17 と JMP18 の違いがわかりました。
スタックモードに切り替えると、JMP18 でラベルが中央に配置されます。
残念ながら、このモードはエラーバーと互換性がありません。
したがって、別のフローティング棒グラフを使用してエラー バーを追加する必要があります。
合計で:

100% GUI - 0% スクリプト。
スクリプトは次のとおりです:
もっと見る...Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 521, 429 ),
Variables( X( :age ), Y( :height ) ),
Elements(
Points( X, Y, Legend( 2 ) ),
Bar(
X,
Y,
Bar Style( "Stacked" ),
Summary Statistic( "Mean" ),
Label( "Label by Value" )
),
Bar(
X,
Y,
Bar Style( "Float" ),
Summary Statistic( "Mean" ),
Error Interval( "Standard Error" )
)
)
);
... この投稿が、ラベルの位置を指定するための新機能に反対するために使われないことを願っています。
Re: グラフビルダーの棒グラフのラベルのオフセットこれらの投稿に感謝します。役に立ちます。
Re: グラフビルダーの棒グラフのラベルのオフセットヒートマップ プロットにも通信する「セグメント」がありますか?
このリストにないもの:

それはHeatmap Cells Segと呼ばれますか?
myseg << get description = "Heatmap Cells";
-> いいえ。
Re: グラフビルダーの棒グラフのラベルのオフセット長方形セグメント。
残念ながら、Heatmap Seg = Rect Seg はまったく役に立ちません 