5
Jak stworzyć wykres gęstości w matplotlib?
W RI można stworzyć pożądane wyjście, wykonując: data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8), rep(4.5, 3), rep(5.5, 1), rep(6.5, 8)) plot(density(data, bw=0.5)) W Pythonie (z matplotlib) najbliższy otrzymałem był z prostym histogramem: import matplotlib.pyplot as plt data = [1.5]*7 + [2.5]*2 + [3.5]*8 + [4.5]*3 + [5.5]*1 + [6.5]*8 …
122
python
r
numpy
matplotlib
scipy