ジャンプマークの中央は Y バーで始まり、X ティックで終わり、最初のバーと最後のバーの半分だけをカバーします。

ジャンプマークの中央は Y バーで始まり、X ティックで終わり、最初のバーと最後のバーの半分だけをカバーします。

グラフィックでこの問題があります。正確に実行する必要がありますが、ジャンプ マークの中央はティックから始まります。他のバーと同様にバー全体をカバーしたいです。考えられる唯一の解決策は、最初と最後の空のバーを追加することですが、ノードとバーを非表示にする方法がまだわかりません。これがコードです。

\begin{tikzpicture}
\begin{axis}[width=\textwidth,height=10cm,
legend entries={Nord, Sud, Est, Ovest, Media},
%ylabel={\%},
symbolic x coords={Alimentari,Gastronomie,Macellerie,Discount,Ipermercati,Supermercati~grandi,Supermercati~piccoli,Ingrossi,Altro},
every node near coord/.style={font=\large },
every node near coord/.append style={yshift=1mm,
/pgf/number format/fixed,
/pgf/number format/precision=1
},
x tick label style={rotate=45,anchor=east},
ymin=-1,
xtick pos=left,
ytick pos=left
]
\addplot[jump mark mid, blue, very thick, line legend] table[x={esercizio}, y={Nord}] {scostamentotipoes.dat};
\addplot[jump mark mid,red, very thick, line legend] table[x={esercizio}, y={Sud}] {scostamentotipoes.dat};
\addplot[jump mark mid,green, very thick, line legend] table[x={esercizio}, y={Est}] {scostamentotipoes.dat};
\addplot[jump mark mid,yellow, very thick, line legend] table[x={esercizio}, y={Ovest}] {scostamentotipoes.dat};
\addplot[ybar,bar width=30, black, very thick, area legend, nodes near coords={\pgfmathprintnumber\pgfplotspointmeta\%}] table[x={esercizio}, y={Media}] {scostamentotipoes.dat};
\end{axis}
\end{tikzpicture}

助けていただけるとありがたいです。私はPGFの専門家ではありませんが… グラフィック画像 ありがとうございます

以下に単純化した例を示します。

\documentclass{article}
\usepackage{graphicx}
\usepackage{pgfplots}

\begin{document}

\begin{figure}
\begin{tikzpicture}
\begin{axis}[
legend entries={subset, mean},
symbolic x coords={A,B,C},
xtick pos=left,
ytick pos=left,
ymin=0,
]
\addplot[
jump mark mid,
blue, very thick, line legend] coordinates{(A,1) (B,2) (C,1.5)};
\addplot[ybar,bar width=30, black, very thick, area legend, nodes near coords={\pgfmathprintnumber\pgfplotspointmeta\%}] coordinates{(A,2) (B,3) (C,1)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}

とにかく、私は自分で解決策を見つけました(疲れていただけだと思います...)「ジャンプマークの途中」を単純な線マークに置き換えることで

only marks, mark=-, mark size=16,

答え1

投稿を閉じるためだけに...私にとってうまくいった明らかな解決策は、ジャンプマークの代わりに単純なラインマークを使用することでした。

jump mark mid,

only marks, mark=-, mark size=16,

関連情報