在 Latex 中將 .dat 檔案描繪成等值線圖

在 Latex 中將 .dat 檔案描繪成等值線圖

我準備了一個 .dat 文件,其中包含與特定徑向函數相關的一些機率數值資訊。我想在等高線圖中描繪這些訊息,如附圖所示。該圖是在 Mathematica 中繪製的,但我想用乳膠中準備好的 .dat 檔案繪製該圖。我不知道我該如何弄清楚。請你幫助我好嗎?

此致,

哈迪。

在此輸入影像描述

答案1

在 pgfplots 回答之前,以下是如何免費取得繪圖的方法

\documentclass[tikz]{standalone}

\pgfdeclarefunctionalshading{probability amplitude}{\pgfpoint{-25bp}{-25bp}}{\pgfpoint{25bp}{25bp}}{}{
    % x y
    dup mul exch % y² x
    dup mul add % y²+x²
    sqrt % r
    dup 100 mul sin % r sin(100r)
    exch div % sin(100r)/r
    10 mul % 10sin(100r)/r
}
\begin{document}
    \tikz\path[shading=probability amplitude](-10,-10)rectangle(10,10);
\end{document}

相關內容