原始文件(SVG文件,尺寸为330 × 255像素,文件大小:86 KB)


摘要

描述
English: Plot of the probability mass function for the Poisson distribution.
日期
来源 自己的作品
作者 Skbkekas
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用Matplotlib创作。
源代码
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp

col = {1 : 'orange', 4: 'purple', 10: 'lightblue'}

X = np.arange(0, 21)

plt.rc('text', usetex = True)
plt.rc('font', family = 'serif', size = 12)

##                                                                                
## PMF                                                                            
## 

plt.clf()
plt.figure(figsize=(4,3.2))

A = []
for L in 1,4,10:

    P = -L + X*np.log(L) - sp.gammaln(X+1)
    P = np.exp(P)

    plt.plot(X, P, '-', color='grey', label='_nolegend_')
    a = plt.plot(X, P, 'o', color=col[L], markeredgecolor='k', markeredgewidth=0.5)
    A.append(a)

plt.xlabel("$k$")
plt.ylabel(r"$P(x=k)$")
plt.ylim([0,0.4])
plt.yticks(np.arange(0,0.42,.05))
plt.tick_params(direction='in', top=True, right=True)

plt.legend((r"$\lambda=1$", r"$\lambda=4$", r"$\lambda=10$"),
                numpoints=1, handlelength=0.75, handletextpad=0.5,\
                loc="upper right", frameon=False)
plt.xlim(-1,21)

plt.savefig("poisson_pmf.pdf")
plt.savefig("poisson_pmf.svg")

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名
本文件采用知识共享署名 3.0 未本地化版本许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

image/svg+xml

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2020年11月21日 (六) 03:262020年11月21日 (六) 03:26版本的缩略图330 × 255(86 KB)AkanoToERemoved white background and recropped to fit axis labels
2020年11月21日 (六) 03:232020年11月21日 (六) 03:23版本的缩略图360 × 288(39 KB)AkanoToEMade all text LaTeX, fixed legend text spacing
2015年9月12日 (六) 01:222015年9月12日 (六) 01:22版本的缩略图360 × 288(42 KB)TrlklyRemoved outer white background for aesthetic reasons (by hand).
2010年2月10日 (三) 20:232010年2月10日 (三) 20:23版本的缩略图360 × 288(42 KB)Skbkekas{{Information |Description={{en|1=Plot of the probability mass function for the Poisson distribution.}} |Source={{own}} |Author=Skbkekas |Date=2-10-2010 |Permission= |other_versions= }} Category:Statistical diagrams

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据