Skip to content

Commit

Permalink
Bug correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
afraniomelo committed Apr 13, 2023
1 parent 2f4ee57 commit 4c5160e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions kydlib/kydlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,31 +387,31 @@ def autocorrelation_plot (self, plot_acf = False, plot_bar = True,

if ax_bar is None:
fig_bar, ax_bar = plt.subplots()

else:

fig_bar= None

self.critic_auto_x = [np.searchsorted(-self.lags_y[i],
-critic_auto)
for i in range(len(self.lags_y))]
-critic_auto)
for i in range(len(self.lags_y))]

ax_bar.bar(range(1,len(self.critic_auto_x)+1),
np.array(self.critic_auto_x), color='k');
np.array(self.critic_auto_x), color='k');
ax_bar.set_xlabel('Variable')
ax_bar.set_ylabel('Number of lags')
ax_bar.set_xlim([0,self.m+1]);
ax_bar.set_xticks(np.arange(1,self.m+1));
ax_bar.xaxis.set_tick_params(labelsize=12)
ax_bar.axhline(np.mean(self.critic_auto_x),
ls='-',c='k',label='mean')
ls='-',c='k',label='mean')
ax_bar.axhline(np.median(self.critic_auto_x),ls='-.',
c='k',label='median')
c='k',label='median')
ax_bar.legend();
if title_bar:
ax_bar.set_title(f'Number of lags necessary to achieve'
f' {critic_auto} autocorrelation')
f' {critic_auto} autocorrelation')

else:

fig_bar= None

if return_fig:
return fig_acf, fig_bar

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
name='kydlib',
description='Routines for exploratory data analysis.',
license="MIT",
version='0.3.0',
version='0.3.1',
long_description=README,
long_description_content_type='text/markdown',
url='https://github.com/afraniomelo/kydlib',
Expand Down

0 comments on commit 4c5160e

Please # to comment.