Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contours): use nan for mpl contour masks on structured grids #1766

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Apr 14, 2023

#1615 switched PlotMapView.contour_array() from tricontours to standard Matplotlib contours for structured grids, but did not update the masking mechanism — in the meantime the masked_values argument was ignored for structured grids and only used for vertex/unstructured grids, which still use tricontours.

This PR adds support for structured grid contour masks, converting any masked_values to np.nan before passing the masked array to contour/contourf.

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #1766 (c336ed7) into develop (516721d) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           develop   #1766   +/-   ##
=======================================
  Coverage     72.1%   72.1%           
=======================================
  Files          253     253           
  Lines        56040   56050   +10     
=======================================
+ Hits         40420   40430   +10     
  Misses       15620   15620           
Impacted Files Coverage Δ
flopy/plot/map.py 83.9% <100.0%> (+0.4%) ⬆️

@langevin-usgs langevin-usgs merged commit baa322a into modflowpy:develop Apr 14, 2023
@wpbonelli wpbonelli deleted the contours branch April 14, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants