空白文字を含むシンボリック x 座標を持つ PGFPLOTS と、データが .txt ファイルから取得される

空白文字を含むシンボリック x 座標を持つ PGFPLOTS と、データが .txt ファイルから取得される

私は半日かけて、PGFPLOTS通常は非常にうまく機能する棒グラフを作成しようとしています。しかし、今度はsymbolic x coords「2m C」のような空白文字を含む名前を使用する必要があります。これにより、txt ファイルからデータが読み取られるときにエラーが発生します。

ここで書くのは初めてなので、すべての形式が正しいことを願っています ;-)

助けてくれてありがとう!

以下は私のコードとデータです

\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
width=\textwidth,
xlabel= Cases,
ymin = 0,
ymax = 52,
ybar=2,
symbolic x coords={Chips,2m C,External recycling,Sawdust,4m Ds,3m Ds,2m Ds,4m C,3m C,Offcuts,Bark extern,Residues,Bark internal,CB Dh,CB C,CB Ds,Slabs,Hardwood,Complaint},]

\addplot[draw=none] table[y index=1 {result_assortment.txt};
\addplot[draw=none] table[y index=2] {result_assortment.txt};


\legend{Loaded Runs, Empty Runs}
\end{axis}
\end{tikzpicture}
\end{figure}

そしてデータ

FF                  Case A      Final
Chips               39245.77    37038.03
2m C                5490.63     5490.63
External recycling  2658.83     1436.96
Sawdust             4075.6      3834.34
4m Ds               5278.69     5456.15
3m Ds               7256.12     7136.97
2m Ds               1263.25     997.2
4m C                44248.02    25461.51
3m C                69276.62    20896.06
Offcuts             12709.9     12080.03
Bark extern         547         285.71
Residues            1337.05     1091.96
Bark internal       12276.22    0
CB Dh               9089.01     7886.36
CB C                15884.24    12338.54
CB Ds               4694.89     2506.33
Slabs               10553.13    6787.87
Hardwood            761.76      225.35
Complaint           1023.09     1035.27

関連情報