使用 tikz 繪製 2D 機率密度圖 2024-6-20 • tikz-pgf 我想使用 tikz 繪製 2D 機率密度圖草圖。 但是,我在網上找不到類似的例子。使用tikz可以畫出類似的圖形嗎?謝謝! 答案1 您可以使用該pgfplots套件在 tikz 中輕鬆生成此類圖: \documentclass{book} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[view={0}{90}] \addplot3 [surf] {exp(-sqrt(x^2 + y^2))}; \end{axis} \end{tikzpicture} \end{document} 相關內容