Skip to content

Commit

Permalink
Merge PR # (Fix dynamic ratio colorbar min/max values)
Browse files Browse the repository at this point in the history
This merge brings PR #344 (Fix computation of dynamic ratio colorbar
min/max values in six_plot.py in six_plot.py, by @yantosca) into the
GCPy 1.6.0 development stream.

This PR fixes an issue where the dynamic ratio plots (in 6-panel
comparison plots) under certain conditions had a too-narrow colorbar
range to represent the actual data values.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Oct 8, 2024
2 parents 2bb5adc + 572b083 commit acb8626
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- Fixed formatting error in `.github/workflows/stale.yml` that caused the Mark Stale Issues action not to run
- Now flag differences greater than +/- 10% in benchmark timing table outputs
- Fixed error in computation of dynamic ratio plot min & max values in `plot/six_plot.py`

### Removed
- Removed `gcpy/benchmark/modules/species_database.yml` file and corresponding code pointing to this
Expand Down
4 changes: 2 additions & 2 deletions gcpy/plot/six_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ def vmin_vmax_for_ratio_plots(
"""
# Ratio (dynamic range) subplot)
if subplot in "dyn_ratio":
vmax = np.max(
vmin = np.min(
[np.abs(np.nanmin(plot_val)), np.abs(np.nanmax(plot_val))]
)
vmin = 1.0 / vmax
vmax = 1.0 / vmin
if vmin > vmax:
vmin, vmax = vmax, vmin
verbose_print(verbose, rowcol, vmin, vmax)
Expand Down

0 comments on commit acb8626

Please sign in to comment.