生の gnuplot を使用した pgfplots のエラーバー

生の gnuplot を使用した pgfplots のエラーバー

私は、gnuplot を使用してデータを前処理する方がよいため、常に pgfplots を 'raw gnuplot' オプションと組み合わせて使用​​します。(曲線フィッティング、複雑な計算など)

現在、私は「raw gnuplot」オプションを使いながら、プロットにエラーバーを追加しようとして問題に直面しています。マニュアルを確認し、インターネットで解決策を探しましたが、見つかったのは、あまり満足のいくものではない回避策だけでした。

% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape --synctex=1 --interaction=nonstopmode]

\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}

\begin{filecontents*}{data.dat}
#x y x_err y_err
1 2 0.5 0.5
2 8 0.3 0.3
3 9 0.7 0.3
4 1 0.5 0.5
5 2 0.5 0.9
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
    \begin{axis}

        \addplot gnuplot [
        draw=none,
        mark=none,
        forget plot,
        raw gnuplot,
        ] {
            plot 'data.dat' using 1:2:3:4 with xyerrorbars;
        };
        \addplot+ [
            error bars/.cd,
            y dir=both,y explicit,
            x dir=both,x explicit,
        ] table [
            x error expr=((\thisrowno{3}-\thisrowno{2})/2),
            y error expr=((\thisrowno{5}-\thisrowno{4})/2),
        ]{\jobname.pgf-plot.table};

    \end{axis}
\end{tikzpicture}
\end{document}

誰か、「raw gnuplot」を使用しながらエラーバーを追加でき、2 番目の「addplot table」を必要としないソリューションを教えてくれませんか?

関連情報