TransWikia.com

setting a normal distribution over a graph's node using tikz

TeX - LaTeX Asked by Dalek on December 1, 2020

I would like to add a normal distribution inside a circle node using tikz package

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

The area under the plot would be coloured if it is possible only the horizontal axis will appear without any ticks inside the node.

One Answer

You can use a 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}

enter image description here

Answered by user227987 on December 1, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP