Skip to content

Commit

Permalink
update plot gev example
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfarrag committed Aug 17, 2024
1 parent 2311362 commit 280d3fc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions statista/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,26 @@ def plot(
matplotlib figure object
Tuple[Axes, Axes]:
matplotlib plot axes
Examples
--------
- Instantiate the Gumbel class with the data and the parameters.
>>> import numpy as np
>>> data = np.loadtxt("examples/data/time_series1.txt")
>>> parameters = {"loc": 16.3928, "scale": 0.70054, "shape": -0.1614793,}
>>> gev_dist = GEV(data, parameters)
- to calculate the confidence interval, we need to provide the confidence level (`alpha`).
>>> fig, ax = gumbel_dist.plot()
>>> print(fig)
Figure(1000x500)
>>> print(ax)
(<Axes: xlabel='Actual data', ylabel='pdf'>, <Axes: xlabel='Actual data', ylabel='cdf'>)
.. image:: /_images/gev-plot.png
:align: center
"""
# if no parameters are provided, take the parameters provided in the class initialization.
if parameters is None:
Expand Down

0 comments on commit 280d3fc

Please sign in to comment.