使用 tikz 在圖的節點上設定常態分佈

使用 tikz 在圖的節點上設定常態分佈

我想添加一個常態分佈tikz使用包在圓形節點內

\node[scale=4,circle, fill=blue!55!cyan!25] (Og1) at (0,0) {};

如果可能僅出現水平軸而節點內沒有任何刻度,則圖下方的區域將被著色。

答案1

您可以使用一個path picture.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
 \node[circle,draw,minimum size=4cm,path picture={
 \draw[fill=blue] let 
 \p1=($(path picture bounding box.north east)-(path picture bounding box.south
  west)$)
  in plot[variable=\t,domain=-1:1,smooth] 
  ({\t*\x1/2},{exp(-\t*\t)}) |- (-\x1,0)
  (-0.5*\x1,0) edge[-stealth] (0.48*\x1,0)
   (0,0) edge[-stealth] (0,0.48*\y1);
 }]{};
\end{tikzpicture}
\end{document}

在此輸入影像描述

相關內容