I have two numpy arrays: time and year. The time column contains timestamps for one day and contains 1440 rows, in which each row represents a ten minute interval. For example, time = [10, 20, 30, ..., 1440]. You can think of the time column as a 'Count' column. The year column contains years from 1996 to 2020, which looks like the following: year = [1996, 1996, ..., 1997, 1997, 1997, ..., 2020, 2020, 2020, 2020]. I have posted the code and the plot below what I have been able to generate so far. I would like to limit the y-axis to (144 x 366 x 25 = 1317600). Any help would be greatly appreciated.
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import scipy.io
import pandas as pd
import numpy as np
import seaborn as sns
mat = scipy.io.loadmat(r'C:\LocalData\sujaiban\sujai.banerji\fieldcourse_hyytiala\Data\Hyytiala\DMPS GR & J\J_325_19962020_10min.mat')
dN_dt_df = pd.DataFrame()
dN_dt_df = mat
J325 = list(dN_dt_df.values())[3]
J325_df = pd.DataFrame(J325, columns = ['Time in datenum', 'Formation rate 3-25 nm', 'dN/dt', 'Coagulation sink term', 'Growth rate term', 'Particle number concentrations'])
matlab_datenum = J325_df['Time in datenum'].astype(int)
matlab_datenum_numpy_array = matlab_datenum.to_numpy()
python_datetime_pandas_dataframe = pd.to_datetime(matlab_datenum_numpy_array - 719529, unit = 'D')
df = pd.DataFrame(python_datetime_pandas_dataframe, columns = ['DateTime'])
df['Date'] = df['DateTime'].dt.strftime('%d/%m/%Y')
df['Time'] = df['DateTime'].dt.strftime('%H:%M')
df['Year'] = df['DateTime'].dt.year
python_year_pandas_dataframe = df['Year']
year = python_year_pandas_dataframe.to_numpy()
series_of_date_strings = pd.Series(df['Year'], dtype = 'string')
series_of_ten_minutes = np.zeros(shape = (144, 1), dtype = 'int')
i = 0
for j in range(10, 1450, 10):
series_of_ten_minutes[i] = j
i = i + 1
time = series_of_ten_minutes
sns.set_style('white')
sns.histplot(x = year)
plt.ylim(0, 1317600)