原始文件(SVG文件,尺寸为327 × 260像素,文件大小:91 KB)


摘要

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

Python code

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

X = np.arange(0,21)

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

##                                                                                
## CDF                                                                            
## 

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

plt.clf()
plt.figure(figsize=(4,3.2))
plt.axes([0.17,0.13,0.79,0.8])

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

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

    for k in range(1,len(X)):
        plt.plot([k-1,k], [P[k-1],P[k-1]], '-', 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(u"$P(X\le k)$")

bx = plt.legend((r"$\lambda=1$", r"$\lambda=4$", r"$\lambda=10$"),\
                numpoints=1, handletextpad=0, loc="lower right")
bx.draw_frame(False)
plt.xlim([-1,21])
plt.ylim([0,1])

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

许可协议

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

说明

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

此文件中描述的项目

描繪內容

image/svg+xml

文件历史

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

日期/时间缩⁠略⁠图大小用户备注
当前2020年11月21日 (六) 03:252020年11月21日 (六) 03:25版本的缩略图327 × 260(91 KB)AkanoToEMade all text LaTeX, fixed legend text spacing
2015年9月12日 (六) 01:232015年9月12日 (六) 01:23版本的缩略图360 × 288(53 KB)TrlklyRemoved outer white background for aesthetic reasons (by hand).
2010年2月10日 (三) 20:252010年2月10日 (三) 20:25版本的缩略图360 × 288(54 KB)Skbkekas{{Information |Description={{en|1=Plot of the cumulative distribution function for a Poisson distribution}} |Source={{own}} |Author=Skbkekas |Date=2010-2-10 |Permission= |other_versions= }} Category:Statistical diagrams

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据