Skip to content

Commit

Permalink
FIX: Fix syntax in windrosedisplay...
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Sep 26, 2024
1 parent 2bd7563 commit 189468e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions act/plotting/windrosedisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ def plot_data(
# Produce direction (x-axis) and speed (y-axis) plots displaying the mean
# as the contours.
spd_data = ds[spd_field].values
spd_bins = np.linspace(0, ds[spd_field].values.max(), num_data_bins + 1)
spd_bins = np.linspace(0, ds[spd_field].max().values, num_data_bins + 1)
spd_bins = np.insert(spd_bins, 1, calm_threshold)
# Set up an array and cycle through the data, binning them by speed/direction
# Set up an array and cycle through the data, binning them by speed/direction
mean_data = np.zeros([len(bins), len(spd_bins)])
for i in range(len(bins) - 1):
for j in range(len(spd_bins)):
Expand All @@ -432,7 +432,6 @@ def plot_data(
mean_data = np.insert(mean_data, -1, mean_data[0, :], axis=0)
bins.append(bins[0])
mean_data[-1, :] = mean_data[0, :]

# In order to properly handle vmin/vmax in contours, need to adjust
# the levels plotted and remove the keywords to contourf
vmin = np.nanmin(mean_data)
Expand Down
Binary file modified tests/plotting/baseline/test_plot_datarose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 189468e

Please sign in to comment.