Skip to content

Commit

Permalink
Merge pull request #438 from brightwind-dev/iss429_shear_TimeOf_day_l…
Browse files Browse the repository at this point in the history
…abelling_bug

[iss 429] bug fix for Shear.TimeOfDay
  • Loading branch information
stephenholleran authored May 29, 2024
2 parents 834be32 + 93e5cf8 commit afbff66
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Given a version number MAJOR.MINOR.PATCH, increment the:

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

## [2.2.1]
1. Bug fix some users encounter with `plot.plot_shear_time_of_day()` (Issue [#429](https://github.com/brightwind-dev/brightwind/issues/429)).

## [2.2.0]
1. Modify `Correl.OrdinaryLeastSquares()` to force the intercept to pass through the origin (Issue [#412](https://github.com/brightwind-dev/brightwind/issues/412)).
1. Update `LoadBrightHub.get_data()` to use a new API (Issue [#419](https://github.com/brightwind-dev/brightwind/issues/419)).
Expand Down
2 changes: 1 addition & 1 deletion brightwind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

__all__ = ['analyse', 'transform', 'export', 'load', 'demo_datasets']

__version__ = '2.2.0'
__version__ = '2.2.1'
4 changes: 2 additions & 2 deletions brightwind/analyse/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ def plot_shear_time_of_day(df, calc_method, plot_type='step'):
ax.set_ylabel(label)

# create x values for plot
idx = pd.date_range('2017-01-01 00:00', '2017-01-01 23:00', freq='1H').time
idx = pd.date_range('2017-01-01 00:00', '2017-01-01 23:00', freq='1H').hour

if plot_type == 'step':
df = df.shift(+1, axis=0)
Expand All @@ -2158,7 +2158,7 @@ def plot_shear_time_of_day(df, calc_method, plot_type='step'):
ax.plot(idx, df.iloc[:, i], label=df.iloc[:, i].name, color=colors[i])

ax.legend(bbox_to_anchor=(1.1, 1.05))
ax.set_xticks(df.index)
ax.set_xticks([ix.hour for ix in df.index])
ax.xaxis.set_minor_formatter(mpl.dates.DateFormatter("%H-%M"))
_ = plt.xticks(rotation=90)
return ax.get_figure()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_version(rel_path):
},
url='https://github.com/brightwind-dev/brightwind.git',
# UPDATE VERSION NUMBER HERE:
download_url='https://github.com/brightwind-dev/brightwind/archive/v2.2.0.tar.gz',
download_url='https://github.com/brightwind-dev/brightwind/archive/v2.2.1.tar.gz',
license='MIT',
author='Stephen Holleran of BrightWind Ltd',
author_email='[email protected]',
Expand Down

0 comments on commit afbff66

Please sign in to comment.