You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have tripcolor trianulation plot wave plot and that plot i need to overlap with background as google map with zoom function , so i tried mplleaflet but the tripcolor plot is not coming over the map.
can you tell me how to do this.
%matplotlib inline
import matplotlib.pyplot as plt
from scipy.io import loadmat
import mplleaflet
import datetime
import pandas as pd
from dateutil.parser import parse
Hi,
I have tripcolor trianulation plot wave plot and that plot i need to overlap with background as google map with zoom function , so i tried mplleaflet but the tripcolor plot is not coming over the map.
can you tell me how to do this.
%matplotlib inline
import matplotlib.pyplot as plt
from scipy.io import loadmat
import mplleaflet
import datetime
import pandas as pd
from dateutil.parser import parse
import matplotlib as mpl
from pylab import *
import numpy as np
import os
#fig=plt.figure()
#fig, ax = plt.subplots(figsize=(13, 13), subplot_kw=dict(projection=projection))
os.environ['PROJ_LIB'] = r'C:\Users\walps\Anaconda3\pkgs\proj4-5.2.0-ha925a31_1\Library\share'
from datetime import timedelta
import matplotlib.tri as mtri
datamat = loadmat('IOEC_ECM2017_BC.mat')
Xp = datamat['Xp']
Yp = datamat['Yp']
strt = datetime.datetime(2017, 1, 11, 0, 0)
end = datetime.datetime(2017, 1, 21, 0, 0)
numdays = 3
def perdelta(strt, end, delta):
curr = strt
while curr < end:
yield curr
curr += delta
Read element file
data = pd.read_table('fort.ele',delim_whitespace=True,names=('A','B','C','D'))
tri_new = pd.read_csv('fort.ele', delim_whitespace=True, names=('A', 'B', 'C', 'D'), usecols=[1, 2, 3], skiprows=1,
dtype={'D': np.int})
data1=data[['B','C','D']]
tri=data1[1:]
dateList = []
for result in perdelta(strt, strt + timedelta(days=2), timedelta(hours=3)):
dat = result
# print(result)
dt = parse(str(dat))
yr = dt.year
mn = dt.month
d = dt.day
hr = dt.hour
mi = dt.minute
# print(y,mn,d,hr,mi)
if hr < 10:
# d='0'+str(d)
hr = '0' + str(hr)
else:
d = str(d)
hr = str(hr)
if int(d) < 10:
d = '0' + str(d)
else:
d = str(d)
varname = 'Hsig_' + str(yr) + '0' + str(mn) + str(d) + '_' + hr + '0000'
print(varname)
The text was updated successfully, but these errors were encountered: