\documentclass{article}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotstableset{
create on use/mean/.style args={#1#2#3}{
create col/expr={(\thisrowno{#1} + \thisrowno{#2} + \thisrowno{#3})/3}
}
}
\begin{document}
\pgfplotstableread{
1 1 2 3
2 2 3 4
3 3 4 5
4 4 5 6
}\mydata
\begin{tikzpicture}
\begin{axis}[]
\addplot[] table [x index=0, y=mean{1}{2}{3}] {\mydata};
\end{axis}
\end{tikzpicture}
\end{document}
このコードはエラーを出します申し訳ありませんが、... から列 'mean{1}{2}{3}' を取得できませんでした。
私がしたいのは、テーブルの 3 つの列 (指定されたインデックスを持つ) の平均を計算することです。
どうすればいいですか?