Jump to content

File:QWeibull cdf.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 401 × 323 pixels, file size: 34 KB)

Summary

Description
English: Graph of the q-Weibull cdf
Date
Source Own work
Author Bscan
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

from __future__ import division
import numpy as np
import matplotlib.pyplot as plt

def qexp(x,q):
 
    if q == 1:
        y = np.exp(x)
    else:
        y = (1+(1-q)*x)**(1/(1-q))
     
    y[ 1+(1-q)*x <=0 ] = 0
    
    return y

step = 0.001
X = np.arange(0, 2.5, step)
 
col = {1: 'orange', 2: 'purple', 3: 'lightblue', 4:'pink'}

plt.figure(figsize=(4,3.2))
plt.axes([0.17,0.13,0.79,0.8])
plt.hold(True)
A = []
leg_str = []
lvals = [1, 1, 1, 0.5]
qvals = [0, 0, 1, 1.5]
kvals = [1,2,2,1]
for i,q,k,l in zip(range(qvals.__len__()),qvals,kvals,lvals):
    qp =1/(2-q)
    lp = l/(2-q)**(1/k)
    C = 1-qexp(-(X/lp)**k,qp)
    integral = sum(P)*step
    a, = plt.plot(X, C, '-', color=col[i+1],lw =2.5)
    A.append(a)
    leg_str.append(r"$\kappa={k},q={q},\lambda={l}$".format(k=k, q=q, l=l))

plt.xlabel("x")
plt.ylabel(r"P(X<=x)")

bx = plt.legend(A, leg_str,numpoints=1, handletextpad=0, loc="lower right")
bx.draw_frame(False)
 
plt.savefig("qWeibull_cdf.svg")

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

35,028 byte

323 pixel

401 pixel

image/svg+xml

6f1e3889269fac6f478ab513d9ba547f8b3881a9

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current04:29, 21 April 2014Thumbnail for version as of 04:29, 21 April 2014401 × 323 (34 KB)BscanUser created page with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata