# How to define and plot a distribution function in python?

I want to define a distribution function (gaussian or skewed,…), the X axis is from 0 to 255. I have the mode which is located at the point 100 and i have two points (40, 170) that i consider thresholds to use them later for segmentation.

How i can define and plot a distribution function in python using these three points? which represents the probability density function for the thresholds (40,170).
the data is represented as follows:

data= [[ 1414.422  ] [ 1420.3629 ] [ 1437.7965 ] [ 1466.9222 ] [ 1507.6661 ] [ 1559.5684 ]
[1622.9027 ] [1697.1913 ] [1782.7708 ] [ 1879.1418 ] [ 1986.3337 ] [ 2104.149  ] [ 2232.3384 ]
[2370.8474 ] [2519.4717 ] [2678.2246 ] [ 2846.8179 ] [ 3025.1692 ] [ 3213.1992 ] [ 3410.5276 ]
[3617.27 ] [3832.9424 ] [4057.54   ] [ 4290.399  ] [ 4531.5527 ] [ 4780.3047 ] [ 5036.3784 ]
[5299.0293 ] [5568.0947 ] [5842.64   ] [ 6122.7183 ]
...
[12863.871  ] [13202.288  ] [13546.33   ] [13896.613  ] [14252.954  ] [14615.579  ] [14984.21   ]
[15358.823  ] [15739.186  ] [16124.376  ] [16513.904  ] [16907.441  ] [17303.445  ] [17701.768  ]
[18100.904  ]
....
[ 1148.9838 ] [ 1104.6677 ] [ 1062.2582 ] [ 1021.65845] [  982.92505] [  946.0886 ] [  911.1598 ]
[878.2126 ] [  847.2555 ] [  818.30884] [  791.42914] [  766.6395 ] [  743.97437] [  723.43036]
[704.9131 ] [  688.52484] [  674.1055 ] [  661.556  ] [  650.82153] [  641.7832 ] [  634.31036]
[628.1981 ] [  623.3461 ] [  619.4682 ] [  616.5547 ] [  614.3974 ] [  612.8692 ] [  611.84686]
[611.3204 ] [  611.0678 ]]


thank you.

## Related Questions

### Does estimated standard error of the mean says something about the population mean?

1  Asked on January 21, 2021 by funkwecker

### Is the maximum entropy probability distribution only determined through comparison?

0  Asked on January 21, 2021

### Regression when $X$ is random and unobservable

0  Asked on January 20, 2021 by igor-f

### How to use a GAM to predict the probability in binomial data as a function of predictors

1  Asked on January 19, 2021 by wetlabstudent

### How to decode/understand the math behind ACF and PACF?

1  Asked on January 19, 2021 by raghavsikaria

### A/B Testing – Repeated Sampling

0  Asked on January 18, 2021 by thomas-moore

### Anomaly detection for multiple correlated variables (sensors)

0  Asked on January 18, 2021 by shawn-strasser

### Clustering with Likert items and N/A option

1  Asked on January 17, 2021 by matthias

### Case-Control Study Design for Longitudinal Analysis

0  Asked on January 17, 2021 by cat-cuddler

### Multivariate time series vs multi dimensional time series

0  Asked on January 16, 2021 by ss-varshini

### Relation between test and train error with gradient descent iterates

0  Asked on January 16, 2021 by sgg

### How to derive Bias of PCA estimator

0  Asked on January 16, 2021 by baz

### Using gradient information in minimizing error function, in Bishop’s Pattern Recognition

3  Asked on January 16, 2021 by sorcererofdm

### Mean squared error of OLS smaller than Ridge?

5  Asked on January 15, 2021 by aristide-herve

### How to deal with large combinations of factors

0  Asked on January 14, 2021 by mat

### Time series tracking queue optimization problem

1  Asked on January 14, 2021 by doxav

### Sample log geometric distribution from log probability

1  Asked on January 14, 2021

### what is the likelihood function $p(y|a,tau)$ of simple linear regression model?

1  Asked on January 14, 2021 by user261225