Replies: 1 comment
-
This is a jupyter issue not displaying figure, not pyextremes. You are clearly getting figure and axes. I recommend reading matplotlib and jupyter documentation, specifically about |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have an issue with plotting function. When I run the code for the first time, the plot is produced normally. But when I modified some parameters and ran the code again, the figure could not be generated. It would only give (<Figure size 768x480 with 1 Axes>, <Axes: xlabel='time', ylabel='waterlevel '>), as show in the figure below/. The above problem exists in all plot codes. The version of pyextremes is 2.3.2.
Code:
import os
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pandas.plotting import register_matplotlib_converters
import xarray as xr
import pyextremes
from mpl_toolkits.basemap import Basemap
from pyextremes import get_extremes, get_return_periods, EVA, plot_threshold_stability
from pyextremes.plotting import plot_extremes
twlLagos=pd.read_csv((os.path.join(pwd,'01-input','07-TotalWaterLevle','twlLagos.csv')))
twlLagos['time'] = pd.to_datetime(twlLagos['time'])
twlLagos.set_index('time', inplace=True)
plot_threshold_stability(
twlLagos['waterlevel'],
return_period=n,
thresholds=np.arange(0.85,0.94,0.01),
)
extremesPot = EVA(data=twlLagos['waterlevel'])
extremesPot.get_extremes("POT", threshold=0.88, r="24H")
extremesPot.plot_extremes(show_clusters=True)
rp=[2,5,10,25,50,100,250,500,1000]
extremesPot.fit_model()
summary=extremesPot.get_summary(
return_period=rp,
alpha=0.95,
n_samples=1000
)
print(summary)
extremesPot.plot_diagnostic(return_period=rp, alpha=None, plotting_position='weibull')
Big thanks for your time in advance.
Beta Was this translation helpful? Give feedback.
All reactions